[PATCH] powerpc: ARCH=powerpc build fix for CONFIG_SYSVIPC=n || CONFIG_SYSCTL=n

Arthur Othieno apgo at patchbomb.org
Sat Feb 18 21:08:49 EST 2006


When using a default config generated by just `make menuconfig'
(ie. none of arch/powerpc/configs/*), linking .tmp_vmlinux1 barfs with:

  arch/powerpc/kernel/built-in.o: In function `.sys_call_table':
  : undefined reference to `.compat_sys_ipc'
  arch/powerpc/kernel/built-in.o: In function `.sys_call_table':
  : undefined reference to `.compat_sys_sysctl'
  make: *** [.tmp_vmlinux1] Error 1

These are wrapped around #ifdef CONFIG_{SYSVIPC,SYSCTL} respectively.
Fixup to just return -ENOSYS when CONFIG_SYSVIPC=n || CONFIG_SYSCTL=n.

Signed-off-by: Arthur Othieno <apgo at patchbomb.org>

---

Paulus, any chance this can go in before 2.6.16 is Out There(tm) ?

 arch/powerpc/kernel/sys_ppc32.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

122877b2f58236c61f87797c2908a9ab1e3e451d
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index 475249d..272beb3 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -440,7 +440,13 @@ long compat_sys_ipc(u32 call, u32 first,
 
 	return -ENOSYS;
 }
-#endif
+#else
+long compat_sys_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr,
+	       u32 fifth)
+{
+	return -ENOSYS;
+}
+#endif /* CONFIG_SYSVIPC */
 
 /* Note: it is necessary to treat out_fd and in_fd as unsigned ints, 
  * with the corresponding cast to a signed int to insure that the 
@@ -818,7 +824,6 @@ asmlinkage long compat_sys_umask(u32 mas
 	return sys_umask((int)mask);
 }
 
-#ifdef CONFIG_SYSCTL
 struct __sysctl_args32 {
 	u32 name;
 	int nlen;
@@ -829,6 +834,7 @@ struct __sysctl_args32 {
 	u32 __unused[4];
 };
 
+#ifdef CONFIG_SYSCTL
 asmlinkage long compat_sys_sysctl(struct __sysctl_args32 __user *args)
 {
 	struct __sysctl_args32 tmp;
@@ -868,7 +874,12 @@ asmlinkage long compat_sys_sysctl(struct
 	}
 	return error;
 }
-#endif
+#else
+asmlinkage long compat_sys_sysctl(struct __sysctl_args32 __user *args)
+{
+	return -ENOSYS;
+}
+#endif /* CONFIG_SYSCTL */
 
 unsigned long compat_sys_mmap2(unsigned long addr, size_t len,
 			  unsigned long prot, unsigned long flags,
-- 
1.1.5




More information about the Linuxppc64-dev mailing list