From 2de6e0154ca48f59601be2e1601068d22a37dd74ca8780a69ba65365a57f4035 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 27 Dec 2012 15:31:59 +0000 Subject: [PATCH] Accepting request 146438 from home:elvigia:branches:Base:System - Use OS byteswapping routines, application already Includes "endian.h" but then goes ahead defining ad-hoc equivalent functionality (0001-Use-OS-byteswapping-macros.patch) OBS-URL: https://build.opensuse.org/request/show/146438 OBS-URL: https://build.opensuse.org/package/show/Base:System/acl?expand=0&rev=28 --- 0001-Use-OS-byteswapping-macros.patch | 49 +++++++++++++++++++++++++++ acl.changes | 7 ++++ acl.spec | 5 +-- 3 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 0001-Use-OS-byteswapping-macros.patch diff --git a/0001-Use-OS-byteswapping-macros.patch b/0001-Use-OS-byteswapping-macros.patch new file mode 100644 index 0000000..b0615c1 --- /dev/null +++ b/0001-Use-OS-byteswapping-macros.patch @@ -0,0 +1,49 @@ +From 100baaf89cdcb01a1c8d4b05782d7fba56813f96 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Wed, 26 Dec 2012 15:16:40 -0300 +Subject: [PATCH] Use OS byteswapping macros + +while the code already includes "endian.h" it goes ahead +redefining byteswapping routines, thus defeating the very purpose +of the header. +--- + libacl/byteorder.h | 25 ++++++++----------------- + 1 file changed, 8 insertions(+), 17 deletions(-) + +diff --git a/libacl/byteorder.h b/libacl/byteorder.h +index 05f5d87..65c87f3 100644 +--- a/libacl/byteorder.h ++++ b/libacl/byteorder.h +@@ -17,21 +17,12 @@ + + #include + +-#if __BYTE_ORDER == __BIG_ENDIAN +-# define cpu_to_le16(w16) le16_to_cpu(w16) +-# define le16_to_cpu(w16) ((u_int16_t)((u_int16_t)(w16) >> 8) | \ +- (u_int16_t)((u_int16_t)(w16) << 8)) +-# define cpu_to_le32(w32) le32_to_cpu(w32) +-# define le32_to_cpu(w32) ((u_int32_t)( (u_int32_t)(w32) >>24) | \ +- (u_int32_t)(((u_int32_t)(w32) >> 8) & 0xFF00) | \ +- (u_int32_t)(((u_int32_t)(w32) << 8) & 0xFF0000) | \ +- (u_int32_t)( (u_int32_t)(w32) <<24)) +-#elif __BYTE_ORDER == __LITTLE_ENDIAN +-# define cpu_to_le16(w16) ((u_int16_t)(w16)) +-# define le16_to_cpu(w16) ((u_int16_t)(w16)) +-# define cpu_to_le32(w32) ((u_int32_t)(w32)) +-# define le32_to_cpu(w32) ((u_int32_t)(w32)) +-#else +-# error unknown endianess? +-#endif ++# define cpu_to_le16(w16) htole16(w16) ++ ++# define le16_to_cpu(w16) le16toh(w16) ++ ++# define cpu_to_le32(w32) htole32(w32) ++ ++# define le32_to_cpu(w32) le32toh(w32) ++ + +-- +1.8.0.2 + diff --git a/acl.changes b/acl.changes index 7bbe696..d4132de 100644 --- a/acl.changes +++ b/acl.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Dec 26 18:22:59 UTC 2012 - crrodriguez@opensuse.org + +- Use OS byteswapping routines, application already Includes + "endian.h" but then goes ahead defining ad-hoc equivalent + functionality (0001-Use-OS-byteswapping-macros.patch) + ------------------------------------------------------------------- Wed May 30 13:48:17 UTC 2012 - sweet_f_a@gmx.de diff --git a/acl.spec b/acl.spec index 1d2f6b9..b72213b 100644 --- a/acl.spec +++ b/acl.spec @@ -20,7 +20,7 @@ Name: acl %define lname libacl1 BuildRequires: libattr-devel Summary: Commands for Manipulating POSIX Access Control Lists -License: GPL-2.0+ ; LGPL-2.1+ +License: GPL-2.0+ and LGPL-2.1+ Group: System/Filesystems Version: 2.2.51 Release: 0 @@ -28,6 +28,7 @@ Source: %name-%version.src.tar.gz Source2: baselibs.conf Patch0: builddefs.in.diff Patch1: acl-fiximplicit.patch +Patch2: 0001-Use-OS-byteswapping-macros.patch Url: http://download.savannah.gnu.org/releases-noredirect/acl/ BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -74,7 +75,7 @@ to develop applications that require these. %setup -q -n acl-%version %patch0 -p1 %patch1 -p1 - +%patch2 -p1 %build export OPTIMIZER="$RPM_OPT_FLAGS -fPIC" export DEBUG=-DNDEBUG