All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: LKML <linux-kernel@vger.kernel.org>
Subject: Problem with  KERNEL_VERSION macros in 3.7-rc1?
Date: Mon, 15 Oct 2012 11:21:16 -0500	[thread overview]
Message-ID: <507C37FC.9060604@lwfinger.net> (raw)

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





                 reply	other threads:[~2012-10-15 16:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=507C37FC.9060604@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.