Results 1 to 4 of 4
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 ...
- 05-30-2009 #1Just Joined!
- Join Date
- May 2009
- Posts
- 2
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?
*ps: I'm coding in kernel space.
- 05-31-2009 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
In the 2.6 kernel code I have, there is an extern int errno declared in linux/unistd.h. My guess is that if you declare an external int to that variable, you should be ok.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 05-31-2009 #3Just Joined!
- Join Date
- May 2009
- Posts
- 2
I don't think it would work to do like that, for in kernel-2.6.27, there is no definition of errno in linux/unistd.h. All the file where variable errno appears are in folder arch.
- 06-01-2009 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
