[<prev] [next>] [day] [month] [year] [list]
Message-ID: <507C37FC.9060604@lwfinger.net>
Date: Mon, 15 Oct 2012 11:21:16 -0500
From: Larry Finger <Larry.Finger@...inger.net>
To: LKML <linux-kernel@...r.kernel.org>
Subject: Problem with KERNEL_VERSION macros in 3.7-rc1?
The VirtualBox kernel modules need to be modified to account for the removal of
VM_RESERVED in version 3.7-rc1. When I used the normal test of
LINUX_VERSION_CODE against KERNEL_VERSION(3, 7, 0), the fix did not work. To
test why, I added the following code snippet to a module:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
#warning "Compiling 3.7.0"
#else
#warning "Compiling older kernel"
#endif
When compiling this code, I get 'warning: #warning "Compiling older kernel"
[-Wcpp]' on the console. The command 'uname -r' echoes "3.7.0-rc1", and 'git
describe' returns "v3.7-rc1".
My workaround is to define VM_RESERVED if it is not defined.
Thanks,
Larry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists