diff options
author | Tim Yamin <plasmaroo@gentoo.org> | 2004-08-09 21:38:41 +0000 |
---|---|---|
committer | Tim Yamin <plasmaroo@gentoo.org> | 2004-08-09 21:38:41 +0000 |
commit | 60690d309b5431feba1dbc0d2f06262f14102317 (patch) | |
tree | 2959414d5bf3540076949ece147a6259c9b70499 /sys-apps/sg3_utils/files | |
parent | No longer installs /etc/mime.types - RDEPENDs on app-misc/mime-types instead ... (diff) | |
download | gentoo-2-60690d309b5431feba1dbc0d2f06262f14102317.tar.gz gentoo-2-60690d309b5431feba1dbc0d2f06262f14102317.tar.bz2 gentoo-2-60690d309b5431feba1dbc0d2f06262f14102317.zip |
Added a patch to solve PIC issues; bug #59832.
Diffstat (limited to 'sys-apps/sg3_utils/files')
-rw-r--r-- | sys-apps/sg3_utils/files/sg3_utils-llseek.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/sys-apps/sg3_utils/files/sg3_utils-llseek.patch b/sys-apps/sg3_utils/files/sg3_utils-llseek.patch new file mode 100644 index 000000000000..281ed60abf1d --- /dev/null +++ b/sys-apps/sg3_utils/files/sg3_utils-llseek.patch @@ -0,0 +1,69 @@ +diff -Naur sg3_utils-1.06-orig/llseek.c sg3_utils-1.06/llseek.c +--- sg3_utils-1.06-orig/llseek.c 2003-10-19 05:36:40.000000000 -0400 ++++ sg3_utils-1.06/llseek.c 2004-08-09 03:46:19.973864969 -0400 +@@ -14,7 +14,7 @@ + #include <errno.h> + #include <unistd.h> + +-#if defined(__GNUC__) || defined(HAS_LONG_LONG) ++#if defined(__GNUC__) + typedef long long llse_loff_t; + #else + typedef long llse_loff_t; +@@ -24,54 +24,16 @@ + + #ifdef __linux__ + +-#ifdef HAVE_LLSEEK +-#include <syscall.h> +- +-#else /* HAVE_LLSEEK */ +- + #if defined(__alpha__) || defined(__ia64__) || defined(__s390x__) + + #define my_llseek lseek + + #else +-#include <linux/unistd.h> /* for __NR__llseek */ +- +-static int _llseek (unsigned int, unsigned long, +- unsigned long, llse_loff_t *, unsigned int); +- +-#ifdef __NR__llseek +- +-static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high, +- unsigned long, offset_low,llse_loff_t *,result, +- unsigned int, origin) +- +-#else +- +-/* no __NR__llseek on compilation machine - might give it explicitly */ +-static int _llseek (unsigned int fd, unsigned long oh, +- unsigned long ol, llse_loff_t *result, +- unsigned int origin) { +- errno = ENOSYS; +- return -1; +-} +- +-#endif + +-static llse_loff_t my_llseek (unsigned int fd, llse_loff_t offset, +- unsigned int origin) +-{ +- llse_loff_t result; +- int retval; +- +- retval = _llseek (fd, ((unsigned long long) offset) >> 32, +- ((unsigned long long) offset) & 0xffffffff, +- &result, origin); +- return (retval == -1 ? (llse_loff_t) retval : result); +-} ++#define my_llseek lseek64 + +-#endif /* __alpha__ */ ++#endif /* alpha, ia64, s390x */ + +-#endif /* HAVE_LLSEEK */ + + llse_loff_t llse_llseek (unsigned int fd, llse_loff_t offset, + unsigned int origin) |