--- ptxdist-0.3.23/rules/busybox.make.old Sat Aug 23 23:50:14 2003 +++ ptxdist-0.3.23/rules/busybox.make Sat Aug 23 23:48:51 2003 @@ -72,6 +72,7 @@ $(STATEDIR)/busybox.prepare: $(busybox_prepare_deps) @$(call targetinfo, busybox.prepare) + set -e; cd $(BUSYBOX_DIR); for p in $(TOPDIR)/patches/$(BUSYBOX)/*.patch; do if test -f $$p ; then $(PATCH) -p1 < $$p; fi; done # FIXME: is this necessary? touch $(BUSYBOX_DIR)/busybox.links $(BUSYBOX_PATH) make -C $(BUSYBOX_DIR) distclean $(BUSYBOX_MAKEVARS) --- /dev/null Sat Dec 14 13:56:51 2002 +++ ptxdist-0.3.23/patches/busybox-0.61.pre-ptx9/syscalls.patch Sun Aug 24 14:52:20 2003 @@ -0,0 +1,159 @@ +# Dan Kegel 24 Aug 2003 +# This is http://www.busybox.net/cgi-bin/cvsweb/busybox/libbb/syscalls.c.diff?r1=1.9&r2=1.10 +# rediffed against whatever busybox ptxdist-0.3.23 uses. +# This should fix the error +# libbb/syscalls.c: In function `sysfs': +# libbb/syscalls.c:43: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list +# libbb/syscalls.c:43: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list +# libbb/syscalls.c: In function `pivot_root': +# libbb/syscalls.c:68: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list +# make[1]: *** [libbb/syscalls.o] Error 1 +# See also http://lists.debian.org/debian-glibc/2003/debian-glibc-200305/msg00190.html +# A similar fix is needed for fdisk.c + +--- busybox-0.61.pre-ptx9/libbb/syscalls.c.old Sun Aug 24 13:59:04 2003 ++++ busybox-0.61.pre-ptx9/libbb/syscalls.c Sun Aug 24 14:01:52 2003 +@@ -34,71 +34,67 @@ + #endif + #include "libbb.h" + +-#if defined(__ia64__) + int sysfs( int option, unsigned int fs_index, char * buf) + { + return(syscall(__NR_sysfs, option, fs_index, buf)); + } +-#else +-_syscall3(int, sysfs, int, option, unsigned int, fs_index, char *, buf); +-#endif + ++int pivot_root(const char * new_root,const char * put_old) ++{ + #ifndef __NR_pivot_root + #warning This kernel does not support the pivot_root syscall + #warning -> The pivot_root system call is being stubbed out... +-int pivot_root(const char * new_root,const char * put_old) +-{ +- /* BusyBox was compiled against a kernel that did not support +- * the pivot_root system call. To make this application work, +- * you will need to recompile with a kernel supporting the +- * pivot_root system call. +- */ +- error_msg("\n\nTo make this application work, you will need to recompile\n" +- "with a kernel supporting the pivot_root system call. -Erik\n"); +- errno=ENOSYS; +- return -1; +-} ++ /* BusyBox was compiled against a kernel that did not support ++ * the pivot_root system call. To make this application work, ++ * you will need to recompile with a kernel supporting the ++ * pivot_root system call. ++ */ ++ error_msg("\n\nTo make this application work, you will need to recompile\n" ++ "BusyBox with a kernel supporting the pivot_root system call.\n"); ++ errno=ENOSYS; ++ return -1; + #else +-# if defined(__ia64__) +- int pivot_root(const char * new_root,const char * put_old) +- { +- return(syscall(__NR_pivot_root, new_root, put_old)); +- } +-# else +- _syscall2(int,pivot_root,const char *,new_root,const char *,put_old); +-# endif ++ return(syscall(__NR_pivot_root, new_root, put_old)); + #endif +- ++} + + + + #if __GNU_LIBRARY__ < 5 || ((__GLIBC__ <= 2) && (__GLIBC_MINOR__ < 1)) ++ + /* These syscalls are not included as part of libc5 */ +-_syscall2(int, bdflush, int, func, int, data); ++int bdflush(int func, int data) ++{ ++ return(syscall(__NR_bdflush, func, data)); ++} + + #ifndef __alpha__ + # define __NR_klogctl __NR_syslog +- _syscall3(int, klogctl, int, type, char *, b, int, len); ++int klogctl(int type, char *b, int len) ++{ ++ return(syscall(__NR_klogctl, type, b, len)); ++} + #endif + +-#ifndef __NR_umount2 +-# warning This kernel does not support the umount2 syscall +-# warning -> The umount2 system call is being stubbed out... ++ + int umount2(const char * special_file, int flags) + { +- /* BusyBox was compiled against a kernel that did not support +- * the umount2 system call. To make this application work, +- * you will need to recompile with a kernel supporting the +- * umount2 system call. +- */ +- error_msg("\n\nTo make this application work, you will need to recompile\n" +- "with a kernel supporting the umount2 system call. -Erik\n"); +- errno=ENOSYS; +- return -1; +-} +-# else +-_syscall2(int, umount2, const char *, special_file, int, flags); ++#ifndef __NR_pivot_root ++#warning This kernel does not support the umount2 syscall ++#warning -> The umount2 system call is being stubbed out... ++ /* BusyBox was compiled against a kernel that did not support ++ * the umount2 system call. To make this application work, ++ * you will need to recompile with a kernel supporting the ++ * umount2 system call. ++ */ ++ error_msg("\n\nTo make this application work, you will need to recompile\n" ++ "BusyBox with a kernel supporting the umount2 system call.\n"); ++ errno=ENOSYS; ++ return -1; ++#else ++ return(syscall(__NR_umount2, special_file, flags)); + #endif ++} + + + #endif /* __GNU_LIBRARY__ < 5 */ +=================================================================== + +# This is http://www.busybox.net/cgi-bin/cvsweb/busybox/libpwdgrp/setgroups.c.diff?r2=1.4&r1=1.3&diff_format=u +# Should fix the error +# libpwdgrp/setgroups.c: In function `setgroups': +# libpwdgrp/setgroups.c:41: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list +# make[1]: *** [libpwdgrp/setgroups.o] Error 1 + +=================================================================== +RCS file: /var/cvs/busybox/libpwdgrp/setgroups.c,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -r1.3 -r1.4 +--- busybox/libpwdgrp/setgroups.c 2003/07/14 21:20:57 1.3 ++++ busybox/libpwdgrp/setgroups.c 2003/07/22 08:56:48 1.4 +@@ -30,12 +30,11 @@ + _syscall* defined. */ + #define __LIBRARY__ + #include +-#if __GNU_LIBRARY__ < 5 +-/* This is needed for libc5 */ +-#include +-#endif + #include "grp_.h" + +-//#define __NR_setgroups 81 +-_syscall2(int, setgroups, size_t, size, const gid_t *, list); ++int setgroups(size_t size, const gid_t * list) ++{ ++ return(syscall(__NR_setgroups, size, list)); ++} ++ + +