source: clfs-sysroot/patches/util-linux-2.12r-syscall_fixes-1.patch@ 89d5d0b

Last change on this file since 89d5d0b was 8f3d581, checked in by Joe Ciccone <jciccone@…>, 18 years ago

Add all of the patches needed for clfs-sysroot.

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[8f3d581]1Submitted By: Jim Gifford (patches at jg555 dot com)
2Date: 2006-09-30
3Initial Package Version: 2.12r
4Origin: Joe Ciccone and Ryan Oliver
5Upstream Status: Sent
6Description: Fixes Missing Syscalls from the new 2.6.18 headers
7
8diff -Naur util-linux-2.12r.orig/mount/swapon.c util-linux-2.12r/mount/swapon.c
9--- util-linux-2.12r.orig/mount/swapon.c 2004-12-22 01:50:19.000000000 -0800
10+++ util-linux-2.12r/mount/swapon.c 2006-09-30 19:53:01.110866713 -0700
11@@ -75,25 +75,6 @@
12 #define SWAPON_NEEDS_TWO_ARGS
13 #endif
14
15-#ifdef SWAPON_NEEDS_TWO_ARGS
16-#ifdef SWAPON_HAS_TWO_ARGS
17-/* libc is OK */
18-#include <unistd.h>
19-#else
20-/* We want a swapon with two args, but have an old libc.
21- Build the kernel call by hand. */
22-#include <linux/unistd.h>
23-static
24-_syscall2(int, swapon, const char *, path, int, flags);
25-static
26-_syscall1(int, swapoff, const char *, path);
27-#endif
28-#else
29-/* just do as libc says */
30-#include <unistd.h>
31-#endif
32-
33-
34 /*
35 * contents of /proc/swaps
36 */
37diff -Naur util-linux-2.12r.orig/mount/umount.c util-linux-2.12r/mount/umount.c
38--- util-linux-2.12r.orig/mount/umount.c 2005-09-10 11:07:38.000000000 -0700
39+++ util-linux-2.12r/mount/umount.c 2006-09-30 19:50:28.619968401 -0700
40@@ -31,36 +31,11 @@
41 #include <arpa/inet.h>
42 #endif
43
44-#if defined(MNT_FORCE) && !defined(__sparc__) && !defined(__arm__)
45-/* Interesting ... it seems libc knows about MNT_FORCE and presumably
46- about umount2 as well -- need not do anything */
47-#else /* MNT_FORCE */
48-
49-/* Does the present kernel source know about umount2? */
50-#include <linux/unistd.h>
51-#ifdef __NR_umount2
52-
53-static int umount2(const char *path, int flags);
54-
55-_syscall2(int, umount2, const char *, path, int, flags);
56-
57-#else /* __NR_umount2 */
58-
59-static int
60-umount2(const char *path, int flags) {
61- fprintf(stderr, _("umount: compiled without support for -f\n"));
62- errno = ENOSYS;
63- return -1;
64-}
65-#endif /* __NR_umount2 */
66-
67 #if !defined(MNT_FORCE)
68 /* dare not try to include <linux/mount.h> -- lots of errors */
69 #define MNT_FORCE 1
70 #endif
71
72-#endif /* MNT_FORCE */
73-
74 #if !defined(MNT_DETACH)
75 #define MNT_DETACH 2
76 #endif
Note: See TracBrowser for help on using the repository browser.