[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [BusyBox] _syscall*(...)
From: Bastian Blank <waldi () debian ! org>
Date: 2003-05-31 8:47:55
[Download RAW message or body]
[Attachment #2 (multipart/mixed)]
hi folks
this package fixes the last occurance of _syscall* in util-linux
bastian
--=20
Madness has no purpose. Or reason. But it may have a goal.
-- Spock, "The Alternative Factor", stardate 3088.7
["diff" (text/plain)]
diff -ur busybox-cvs-0.60.99.cvs20030426.orig/util-linux/fdisk.c \
busybox-cvs-0.60.99.cvs20030426/util-linux/fdisk.c
--- busybox-cvs-0.60.99.cvs20030426.orig/util-linux/fdisk.c 2003-03-19 \
10:13:00.000000000 +0100
+++ busybox-cvs-0.60.99.cvs20030426/util-linux/fdisk.c 2003-05-31 10:44:28.000000000 \
+0200 @@ -848,39 +848,20 @@
#ifdef __linux__
-#ifdef HAVE_LLSEEK
-#include <syscall.h>
-
-#else /* HAVE_LLSEEK */
-
-#if defined(__alpha__) || defined(__ia64__)
-
-#define my_llseek lseek
-
-#else
-#include <asm/unistd.h> /* for __NR__llseek */
-
-static int _llseek (unsigned int, unsigned long,
- unsigned long, ext2_loff_t *, unsigned int);
-
-#ifdef __NR__llseek
-
-static _syscall5(int,_llseek,unsigned int,f_d,unsigned long,offset_high,
- unsigned long, offset_low,ext2_loff_t *,result,
- unsigned int, origin)
-
-#else
+/* Kernel headers before 2.1.mumble need this on the Alpha to get
+ * _syscall* defined. */
+#define __LIBRARY__
+#include <sys/syscall.h>
+#if __GNU_LIBRARY__ < 5
+/* This is needed for libc5 */
+#include <asm/unistd.h>
+#endif
-/* no __NR__llseek on compilation machine - might give it explicitly */
-static int _llseek (unsigned int f_d, unsigned long oh,
- unsigned long ol, ext2_loff_t *result,
- unsigned int origin) {
- errno = ENOSYS;
- return -1;
+static int _llseek( unsigned int fd, unsigned long offset_high, unsigned long \
offset_low, loff_t *result, unsigned int whence) +{
+ return(syscall(__NR__llseek, fd, offset_high, offset_low, result, whence));
}
-#endif
-
static ext2_loff_t my_llseek (unsigned int f_d, ext2_loff_t offset,
unsigned int origin)
{
@@ -893,10 +874,6 @@
return (retval == -1 ? (ext2_loff_t) retval : result);
}
-#endif /* __alpha__ */
-
-#endif /* HAVE_LLSEEK */
-
static ext2_loff_t ext2_llseek (unsigned int f_d, ext2_loff_t offset,
unsigned int origin)
{
[Attachment #6 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic