cvs commit: patches/util-linux util-linux-2.12a-pax-fPIC-1.patch

jim at linuxfromscratch.org jim at linuxfromscratch.org
Fri May 21 16:29:30 PDT 2004


jim         04/05/21 17:29:30

  Added:       util-linux util-linux-2.12a-pax-fPIC-1.patch
  Log:
  Added: util-linux-2.12a-pax-fPIC-1.patch
  
  Revision  Changes    Path
  1.1                  patches/util-linux/util-linux-2.12a-pax-fPIC-1.patch
  
  Index: util-linux-2.12a-pax-fPIC-1.patch
  ===================================================================
  Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
  Date: 2004-05-21
  Initial Package Version: 2.12a
  Origin: http://www.gtlib.cc.gatech.edu/pub/gentoo/gentoo-x86-portage/ \
          sys-apps/util-linux/files/util-linux-2.11z-pic.patch
  Upstream Status: Unknown
  Description: This is needed for Grsec. http://www..grsecurity.net/
  Util linux doesn't build with position independence without this patch.
  
  Also see:
  http://www.linuxfromscratch.org/hlfs/
  
  diff -Naur util-linux-2.12a.orig/fdisk/llseek.c util-linux-2.12a.pax-fPIC/fdisk/llseek.c
  --- util-linux-2.12a.orig/fdisk/llseek.c	2003-07-13 21:13:33.000000000 +0000
  +++ util-linux-2.12a.pax-fPIC/fdisk/llseek.c	2004-05-21 19:01:25.621103728 +0000
  @@ -19,7 +19,7 @@
   
   #else	/* HAVE_LLSEEK */
   
  -#if defined(__alpha__) || defined(__ia64__) || defined(__s390x__)
  +#if defined(__PIC__) || defined(__pic__) || defined(__alpha__) || defined(__ia64__) || defined(__s390x__)
   
   #define my_llseek lseek
   
  diff -Naur util-linux-2.12a.orig/fdisk/sfdisk.c util-linux-2.12a.pax-fPIC/fdisk/sfdisk.c
  --- util-linux-2.12a.orig/fdisk/sfdisk.c	2004-03-04 20:03:59.000000000 +0000
  +++ util-linux-2.12a.pax-fPIC/fdisk/sfdisk.c	2004-05-21 19:00:24.998319792 +0000
  @@ -130,7 +130,9 @@
    *
    * Note: we use 512-byte sectors here, irrespective of the hardware ss.
    */
  -#if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
  +
  +/* do not use the assembler constructed syscalls for seeking if compiled as PIC */
  +#if !defined(__PIC__) && !defined(__pic__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
   static
   _syscall5(int,  _llseek,  unsigned int,  fd, ulong, hi, ulong, lo,
          loff_t *, res, unsigned int, wh);
  @@ -142,7 +144,7 @@
       in = ((loff_t) s << 9);
       out = 1;
   
  -#if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
  +#if !defined(__PIC__) && !defined(__pic__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
       if (_llseek (fd, in>>32, in & 0xffffffff, &out, SEEK_SET) != 0) {
   #else
       if ((out = lseek(fd, in, SEEK_SET)) != in) {
  
  
  



More information about the patches mailing list