diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-07-05 13:49:52 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-07-05 13:49:52 +0000 |
commit | d33928ad3fa562f54c1a649926623a96feae1c64 (patch) | |
tree | 6ab6fb47cd94d98d3555f82ef8a8c1195e6d30cb /main/libc0.9.32/0006-endian.h-add-some-handy-macros-to-be-used-in-syscall.patch | |
parent | a20bdf6b1652bf2a1133b7be6e16e5f970392120 (diff) | |
download | aports-d33928ad3fa562f54c1a649926623a96feae1c64.tar.bz2 aports-d33928ad3fa562f54c1a649926623a96feae1c64.tar.xz |
main/libc0.9.32: backport the pread/pwrite fixes from master
The previous patch I did broke x86_64.
Diffstat (limited to 'main/libc0.9.32/0006-endian.h-add-some-handy-macros-to-be-used-in-syscall.patch')
-rw-r--r-- | main/libc0.9.32/0006-endian.h-add-some-handy-macros-to-be-used-in-syscall.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/main/libc0.9.32/0006-endian.h-add-some-handy-macros-to-be-used-in-syscall.patch b/main/libc0.9.32/0006-endian.h-add-some-handy-macros-to-be-used-in-syscall.patch new file mode 100644 index 0000000000..252c4b7c5a --- /dev/null +++ b/main/libc0.9.32/0006-endian.h-add-some-handy-macros-to-be-used-in-syscall.patch @@ -0,0 +1,37 @@ +From 3dfbb6b7778d05aa7e3809e139115edfd2e0a342 Mon Sep 17 00:00:00 2001 +From: "Peter S. Mazinger" <ps.m@gmx.net> +Date: Thu, 21 Apr 2011 21:20:55 +0200 +Subject: [PATCH 6/6] endian.h: add some handy macros to be used in syscalls + +Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> +Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> +(cherry picked from commit f6a03f19cf2807170717593b4de8056a1248b99b) +--- + include/endian.h | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/include/endian.h b/include/endian.h +index 0ba7384..1e2fc93 100644 +--- a/include/endian.h ++++ b/include/endian.h +@@ -55,6 +55,17 @@ + # define __LONG_LONG_PAIR(HI, LO) HI, LO + #endif + ++#ifdef _LIBC ++# ifndef __ASSEMBLER__ ++# include <stdint.h> ++# define OFF_HI(offset) (offset >> 31) ++# define OFF_LO(offset) (offset) ++# define OFF64_HI(offset) (uint32_t)(offset >> 32) ++# define OFF64_LO(offset) (uint32_t)(offset & 0xffffffff) ++# define OFF_HI_LO(offset) __LONG_LONG_PAIR(OFF_HI(offset), OFF_LO(offset)) ++# define OFF64_HI_LO(offset) __LONG_LONG_PAIR(OFF64_HI(offset), OFF64_LO(offset)) ++# endif ++#endif + + #ifdef __USE_BSD + /* Conversion interfaces. */ +-- +1.7.11.1 + |