linux-look-for-syscall-h-in-kernel-20030519
authorDerrick Brashear <shadow@dementia.org>
Tue, 20 May 2003 04:49:29 +0000 (04:49 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 20 May 2003 04:49:29 +0000 (04:49 +0000)
some new kernels appear not to have linux/syscall.h in the kernel. no clue.

acinclude.m4
src/afs/LINUX/osi_module.c
src/cf/linux-test3.m4

index 0ce0f35..c658cf6 100644 (file)
@@ -166,6 +166,7 @@ case $system in
                 LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
                 LINUX_FS_STRUCT_INODE_HAS_I_DEVICES
                 LINUX_INODE_SETATTR_RETURN_TYPE
+                LINUX_KERNEL_LINUX_SYSCALL_H
                 LINUX_NEED_RHCONFIG
                 LINUX_RECALC_SIGPENDING_ARG_TYPE
                 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_PARENT
@@ -252,6 +253,9 @@ case $system in
                 if test "x$ac_cv_linux_func_recalc_sigpending_takes_void" = "xyes"; then 
                  AC_DEFINE(RECALC_SIGPENDING_TAKES_VOID, 1, [define if your recalc_sigpending takes void])
                 fi
+                if test "x$ac_linux_syscall" = "xyes" ; then
+                 AC_DEFINE(HAVE_KERNEL_LINUX_SYSCALL_H, 1, [define if your linux kernel has linux/syscall.h])
+                fi
                 if test "x$ac_cv_linux_sched_struct_task_struct_has_parent" = "xyes"; then 
                  AC_DEFINE(STRUCT_TASK_STRUCT_HAS_PARENT, 1, [define if your struct task_struct has parent])
                 fi
index cab7e6b..33f20db 100644 (file)
@@ -27,12 +27,11 @@ RCSID("$Header$");
 #include <linux/init.h>
 #include <linux/sched.h>
 #endif
-#ifndef EXPORTED_SYS_CALL_TABLE
+#if !defined(EXPORTED_SYS_CALL_TABLE) && defined(HAVE_KERNEL_LINUX_SYSCALL_H)
 #include <linux/syscall.h>
 #endif
 
 
-
 #ifdef AFS_SPARC64_LINUX24_ENV
 #define __NR_setgroups32      82 /* This number is not exported for some bizarre reason. */
 #endif
index d82c888..929b17d 100644 (file)
@@ -1,3 +1,14 @@
+AC_DEFUN(LINUX_KERNEL_LINUX_SYSCALL_H,[
+  AC_MSG_CHECKING(for linux/syscall.h in kernel)
+  if test -f "${LINUX_KERNEL_PATH}/include/linux/syscall.h"; then
+    ac_linux_syscall=yes
+    AC_MSG_RESULT($ac_linux_syscall)
+  else
+    ac_linux_syscall=no
+    AC_MSG_RESULT($ac_linux_syscall)
+  fi
+])
+
 AC_DEFUN(LINUX_NEED_RHCONFIG,[
 RHCONFIG_SP=""
 RHCONFIG_MP=""