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? |
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. |
Quote:
|
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 |
All times are GMT -5. The time now is 02:02 PM. |