diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-09-01 00:00:32 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-09-01 00:00:32 +0200 |
commit | ca9627e70852f6b2e835660df870fe3ab405882d (patch) | |
tree | 0a008b1d5b16fa0679a195ed7b5662c7891f591c /sys-apps/util-linux/files/util-linux-2.12i-pic.patch | |
download | darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2 darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip |
Initial import
Diffstat (limited to 'sys-apps/util-linux/files/util-linux-2.12i-pic.patch')
-rw-r--r-- | sys-apps/util-linux/files/util-linux-2.12i-pic.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/sys-apps/util-linux/files/util-linux-2.12i-pic.patch b/sys-apps/util-linux/files/util-linux-2.12i-pic.patch new file mode 100644 index 0000000..8fb91be --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.12i-pic.patch @@ -0,0 +1,59 @@ +diff -ur util-linux-2.12i.orig/fdisk/llseek.c util-linux-2.12i/fdisk/llseek.c +--- util-linux-2.12i.orig/fdisk/llseek.c 2004-11-11 20:08:34.074942938 -0500 ++++ util-linux-2.12i/fdisk/llseek.c 2004-11-11 20:09:43.040353443 -0500 +@@ -3,6 +3,9 @@ + * + * Copyright (C) 1994 Remy Card. This file may be redistributed + * under the terms of the GNU Public License. ++ * ++ * Changes: ++ * 20030712 - Alexander Gabert <pappy@nikita.ath.cx> - adding PIC defines + */ + + #include <sys/types.h> +@@ -19,7 +22,9 @@ + + #else /* HAVE_LLSEEK */ + +-#if defined(__alpha__) || defined(__ia64__) || defined(__s390x__) ++/* do not use assembler to put together syscalls at compile time (for llseek for example) when using PIC */ ++#if defined(__alpha__) || defined(__ia64__) || defined(__s390x__) \ ++ || defined(__PIC__) || defined(__pic__) + + #define my_llseek lseek + +diff -ur util-linux-2.12i.orig/fdisk/sfdisk.c util-linux-2.12i/fdisk/sfdisk.c +--- util-linux-2.12i.orig/fdisk/sfdisk.c 2004-11-11 20:08:34.074942938 -0500 ++++ util-linux-2.12i/fdisk/sfdisk.c 2004-11-11 20:11:07.242982424 -0500 +@@ -30,6 +30,7 @@ + * 19990319 - Arnaldo Carvalho de Melo <acme@conectiva.com.br> - i18n + * 20040428 - Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com> - added PACKED + * 20040824 - David A. Wheeler <dwheeler@dwheeler.com> - warnings to stderr ++ * 20030712 - Alexander Gabert <pappy@nikita.ath.cx> - adding PIC defines + */ + + #define PROGNAME "sfdisk" +@@ -172,7 +173,9 @@ + * Note: we use 512-byte sectors here, irrespective of the hardware ss. + */ + #undef use_lseek +-#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 (__alpha__) || defined (__ia64__) || defined (__x86_64__) || defined (__s390x__) \ ++ || defined(__PIC__) && defined(__pic__) + #define use_lseek + #endif + +diff -ur util-linux-2.12i.orig/partx/partx.c util-linux-2.12i/partx/partx.c +--- util-linux-2.12i.orig/partx/partx.c 2004-11-11 20:08:34.155928155 -0500 ++++ util-linux-2.12i/partx/partx.c 2004-11-11 20:12:34.740010020 -0500 +@@ -333,7 +333,8 @@ + /* + * sseek: seek to specified sector + */ +-#if !defined (__alpha__) && !defined (__ia64__) && !defined (__s390x__) && !defined(__x86_64__) ++#if !defined (__alpha__) && !defined (__ia64__) && !defined (__s390x__) && !defined(__x86_64__) \ ++ && !defined(__PIC__) && !defined(__pic__) + #define NEED__llseek + #endif + |