- From: Bob Apodaca <bob_at_phxlab.honeywell.com>
- Date: Wed, 16 Feb 2005 08:21:50 -0700
I am using kernel 2.4.9 and I ran into this problem:
In file included from comedi_fops.c:30:
../include/linux/sched.h: In function `need_resched':
../include/linux/sched.h:17: `current' undeclared (first use in this
function)
../include/linux/sched.h:17: (Each undeclared identifier is reported
only once
../include/linux/sched.h:17: for each function it appears in.)
../include/linux/sched.h:18: warning: control reaches end of non-void
function
make[3]: *** [comedi_ko-comedi_fops.o] Error 1
I changed the order of the include_next in include/linux/sched.h to fix
it. It was:
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20) /* not sure exactly when
need_re
sched() was added */
static inline int need_resched(void)
{
return current->need_resched;
}
#endif
#include_next <linux/sched.h>
#endif
and I changed it to this:
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20) /* not sure exactly when
need_re
sched() was added */
#include_next <linux/sched.h>
static inline int need_resched(void)
{
return current->need_resched;
}
#endif
#endif
diff -u --recursive comedi-0.7.69.orig/include/linux/sched.h comedi-0.7.69/include/linux/sched.h
--- comedi-0.7.69.orig/include/linux/sched.h Fri Oct 1 17:01:55 2004
+++ comedi-0.7.69/include/linux/sched.h Wed Feb 16 07:56:58 2005
_at__at_ -12,13 +12,14 _at__at_
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20) /* not sure exactly when need_resched() was added */
+
+#include_next <linux/sched.h>
+
static inline int need_resched(void)
{
return current->need_resched;
}
#endif
-#include_next <linux/sched.h>
-
#endif
Received on 2005-02-16Z15:21:50