GoogleCloudPlatform / GoogleCloudPlatform/compute-virtual-ethernet-linux

Macro "KERNEL_VERSION" is not defined

Open
#39 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
91
Forks
44
Avg merge
1h 21m
Merged PRs (30d)
2

Description

Hello,
I am trying to compile the gvNIC driver on a compute intance VM based on an CentOS 7 image.
I am getting compilation errors when trying to build the modules with the command :

```make -C /lib/modules/`uname -r`/build M=$(pwd)/build modules modules_install```

My kernel release is `3.10.0-1160.25.1.el7.x86_64`

The error indicates that the KERNEL_VERSION macro is not defined.

`/home/user/compute-virtual-ethernet-linux/build/gve_desc.h:12:27: warning: "KERNEL_VERSION" is not defined [-Wundef]
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0)`
`/home/user/compute-virtual-ethernet-linux/build/gve_desc.h:12:41: error: missing binary operator before token "("
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0)`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.