Accepting request 146506 from 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) (forwarded request 146438 from elvigia) OBS-URL: https://build.opensuse.org/request/show/146506 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/acl?expand=0&rev=30
This commit is contained in:
commit
ac160d6df6
49
0001-Use-OS-byteswapping-macros.patch
Normal file
49
0001-Use-OS-byteswapping-macros.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From 100baaf89cdcb01a1c8d4b05782d7fba56813f96 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
|
||||||
|
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 <endian.h>
|
||||||
|
|
||||||
|
-#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
|
||||||
|
|
@ -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
|
Wed May 30 13:48:17 UTC 2012 - sweet_f_a@gmx.de
|
||||||
|
|
||||||
|
5
acl.spec
5
acl.spec
@ -20,7 +20,7 @@ Name: acl
|
|||||||
%define lname libacl1
|
%define lname libacl1
|
||||||
BuildRequires: libattr-devel
|
BuildRequires: libattr-devel
|
||||||
Summary: Commands for Manipulating POSIX Access Control Lists
|
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
|
Group: System/Filesystems
|
||||||
Version: 2.2.51
|
Version: 2.2.51
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -28,6 +28,7 @@ Source: %name-%version.src.tar.gz
|
|||||||
Source2: baselibs.conf
|
Source2: baselibs.conf
|
||||||
Patch0: builddefs.in.diff
|
Patch0: builddefs.in.diff
|
||||||
Patch1: acl-fiximplicit.patch
|
Patch1: acl-fiximplicit.patch
|
||||||
|
Patch2: 0001-Use-OS-byteswapping-macros.patch
|
||||||
Url: http://download.savannah.gnu.org/releases-noredirect/acl/
|
Url: http://download.savannah.gnu.org/releases-noredirect/acl/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -74,7 +75,7 @@ to develop applications that require these.
|
|||||||
%setup -q -n acl-%version
|
%setup -q -n acl-%version
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
%build
|
%build
|
||||||
export OPTIMIZER="$RPM_OPT_FLAGS -fPIC"
|
export OPTIMIZER="$RPM_OPT_FLAGS -fPIC"
|
||||||
export DEBUG=-DNDEBUG
|
export DEBUG=-DNDEBUG
|
||||||
|
Loading…
Reference in New Issue
Block a user