LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 07-12-2011, 08:12 AM   #1
goossen
Member
 
Registered: May 2006
Location: Asuncion, Paraguay
Distribution: Many
Posts: 206

Rep: Reputation: 39
Which version.h is being used ?


I have a machine which came with the kernel 2.6.18, I've compiled from source a newer kernel (2.6.35) because the patches I'm working on are intended for that version.
I have several of lines like this:
Code:
#include <linux/version.h>
and
Code:
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
These values are defined in version.h but how can I tell to (or know if it) use /opt/kernel/linux-2.6.35/include/linux/version.h instead of /usr/include/linux.version.h (which is 2.6.18) ?

Or am I missing some step related to kernel upgrade ?
 
Old 07-12-2011, 12:16 PM   #2
CapnStank
Member
 
Registered: Oct 2009
Distribution: Fedora, HPUX
Posts: 31

Rep: Reputation: 2
See this post. Basically the .h file located first in your include path is used.

I *believe* you can use `gcc -v` to see your include path but I forget and don't have access to gcc compiler where I am right now.
 
Old 07-13-2011, 05:57 AM   #3
Peverel
Member
 
Registered: May 2009
Location: Chelmsford, England
Distribution: OpenSuse 11.2 and 11.3
Posts: 74

Rep: Reputation: 14
I suggest you read the file \usr\include\linux\version.h ; it appears to tell you what to do.
 
  


Reply

Tags
driver, kernel


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 02:54 PM
Xfree Error (EE) module ABI minor version (7) is newer than the server's version (6) jimdaworm Slackware 0 10-17-2003 05:26 PM
Xfree prob radeon.o kernel module version is 1.1.1 but version 1.5.0 or newer needed. jimdaworm Slackware 0 10-01-2003 06:27 PM


All times are GMT -5. The time now is 06:11 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration