source:
patches/util-linux-2.12r-syscall_fixes-1.patch@
6b5cc685
Last change on this file since 6b5cc685 was 25b0b11, checked in by , 18 years ago | |
---|---|
|
|
File size: 2.1 KB |
-
util-linux-2.12r
Submitted By: Jim Gifford (patches at jg555 dot com) Date: 2006-09-30 Initial Package Version: 2.12r Origin: Joe Ciccone and Ryan Oliver Upstream Status: Sent Description: Fixes Missing Syscalls from the new 2.6.18 headers diff -Naur util-linux-2.12r.orig/mount/swapon.c util-linux-2.12r/mount/swapon.c
old new 75 75 #define SWAPON_NEEDS_TWO_ARGS 76 76 #endif 77 77 78 #ifdef SWAPON_NEEDS_TWO_ARGS79 #ifdef SWAPON_HAS_TWO_ARGS80 /* libc is OK */81 #include <unistd.h>82 #else83 /* We want a swapon with two args, but have an old libc.84 Build the kernel call by hand. */85 #include <linux/unistd.h>86 static87 _syscall2(int, swapon, const char *, path, int, flags);88 static89 _syscall1(int, swapoff, const char *, path);90 #endif91 #else92 /* just do as libc says */93 #include <unistd.h>94 #endif95 96 97 78 /* 98 79 * contents of /proc/swaps 99 80 */ -
util-linux-2.12r
diff -Naur util-linux-2.12r.orig/mount/umount.c util-linux-2.12r/mount/umount.c
old new 31 31 #include <arpa/inet.h> 32 32 #endif 33 33 34 #if defined(MNT_FORCE) && !defined(__sparc__) && !defined(__arm__)35 /* Interesting ... it seems libc knows about MNT_FORCE and presumably36 about umount2 as well -- need not do anything */37 #else /* MNT_FORCE */38 39 /* Does the present kernel source know about umount2? */40 #include <linux/unistd.h>41 #ifdef __NR_umount242 43 static int umount2(const char *path, int flags);44 45 _syscall2(int, umount2, const char *, path, int, flags);46 47 #else /* __NR_umount2 */48 49 static int50 umount2(const char *path, int flags) {51 fprintf(stderr, _("umount: compiled without support for -f\n"));52 errno = ENOSYS;53 return -1;54 }55 #endif /* __NR_umount2 */56 57 34 #if !defined(MNT_FORCE) 58 35 /* dare not try to include <linux/mount.h> -- lots of errors */ 59 36 #define MNT_FORCE 1 60 37 #endif 61 38 62 #endif /* MNT_FORCE */63 64 39 #if !defined(MNT_DETACH) 65 40 #define MNT_DETACH 2 66 41 #endif
Note:
See TracBrowser
for help on using the repository browser.