LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 05-29-2009, 09:23 AM   #1
ao.yuan.young
LQ Newbie
 
Registered: May 2009
Posts: 12

Rep: Reputation: 0
Question some question about kernel-2.4.20/lib/errno.c


In kernel-2.4.20, there was a file named errno.c in folder lib. And a global variable named errno was defined in this .c file. But in kernel-2.6.27, this file doesn't exist any more.
In my hand, there are some code based on kernel-2.4.20, and the global variable errno is used, so if compile the code in my hand based on kernel-2.6.27, an error is given: no definition of errno. How do I solve this problem?
 
Old 05-29-2009, 10:39 AM   #2
ronl
LQ Newbie
 
Registered: Apr 2008
Posts: 2

Rep: Reputation: 0
To use 'errno'

In the source file where you are trying to access the system variable
'errno', include the file "errno.h". This file is found in usr/include/linux and points to subsequent include files where errno is defined.
 
Old 05-29-2009, 08:50 PM   #3
ao.yuan.young
LQ Newbie
 
Registered: May 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ronl View Post
In the source file where you are trying to access the system variable
'errno', include the file "errno.h". This file is found in usr/include/linux and points to subsequent include files where errno is defined.
Thanks for your answer, but I am not coding in user space, but in kernel space. So, do you know in kernel space what I should do to solve this problem??
 
Old 06-01-2009, 10:10 AM   #4
ronl
LQ Newbie
 
Registered: Apr 2008
Posts: 2

Rep: Reputation: 0
I am running RedHat Enterprise Linux, 2.6.18-53.1.4.el5.
The 'errno' files also exist in the kernel source code folders.
Check in .../include/asm-generic/ :

#include <asm-generic/errno.h>

Good luck
 
  


Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie question, about lib during compiling. windhair Programming 4 03-05-2008 11:29 AM
Rebuilding kernel, /lib/modules/*kernel version* not appearing khaos83 Red Hat 2 01-14-2008 03:28 AM
/lib/modules/2.4.33.3/kernel/sound folder is missing after compiling kernel Paulo Ges Slackware - Installation 2 04-15-2007 08:42 PM
lib/modules/ question jaqkar Linux - General 3 03-13-2004 10:58 AM
lib question... Obscure Linux - Software 1 09-18-2003 08:39 AM


All times are GMT -5. The time now is 07:41 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 Google+: linuxquestions
Open Source Consulting | Domain Registration