***** Checking Linux kernel sources *****
compiling the following source file:
#include <linux/version.h>
int printf(const char *format, ...);
int main(void)
{
printf("found version %d.%d.%d", LINUX_VERSION_CODE / 65536,
(LINUX_VERSION_CODE % 65536) / 256,
LINUX_VERSION_CODE % 256);
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0)
printf(", OK.\n");
return 0;
#else
printf(", expected version 2.4.0 or higher\n");
return 1;
#endif
}
using the following command line:
gcc -O -Wall -o .tmp_out .tmp_src.c -nostdinc -I/usr/src/linux/include
.tmp_src.c:2:27: error: linux/version.h: No such file or directory
.tmp_src.c: In function 'main':
.tmp_src.c:6: error: 'LINUX_VERSION_CODE' undeclared (first use in this function)
.tmp_src.c:6: error: (Each undeclared identifier is reported only once
.tmp_src.c:6: error: for each function it appears in.)
.tmp_src.c:9:40: error: missing binary operator before token "("