source: patches/util-linux-2.12r-syscall_fixes-1.patch@ 88b8876

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 88b8876 was 25b0b11, checked in by Jim Gifford <clfs@…>, 18 years ago

Updated Util-Linux Patches

  • Property mode set to 100644
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  
    7575#define SWAPON_NEEDS_TWO_ARGS
    7676#endif
    7777
    78 #ifdef SWAPON_NEEDS_TWO_ARGS
    79 #ifdef SWAPON_HAS_TWO_ARGS
    80 /* libc is OK */
    81 #include <unistd.h>
    82 #else
    83 /* 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 static
    87 _syscall2(int,  swapon,  const char *,  path, int, flags);
    88 static
    89 _syscall1(int,  swapoff,  const char *,  path);
    90 #endif
    91 #else
    92 /* just do as libc says */
    93 #include <unistd.h>
    94 #endif
    95 
    96 
    9778/*
    9879 * contents of /proc/swaps
    9980 */
  • util-linux-2.12r

    diff -Naur util-linux-2.12r.orig/mount/umount.c util-linux-2.12r/mount/umount.c
    old new  
    3131#include <arpa/inet.h>
    3232#endif
    3333
    34 #if defined(MNT_FORCE) && !defined(__sparc__) && !defined(__arm__)
    35 /* Interesting ... it seems libc knows about MNT_FORCE and presumably
    36    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_umount2
    42 
    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 int
    50 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 
    5734#if !defined(MNT_FORCE)
    5835/* dare not try to include <linux/mount.h> -- lots of errors */
    5936#define MNT_FORCE 1
    6037#endif
    6138
    62 #endif /* MNT_FORCE */
    63 
    6439#if !defined(MNT_DETACH)
    6540#define MNT_DETACH 2
    6641#endif
Note: See TracBrowser for help on using the repository browser.