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
This commit is contained in:
parent
b11a90a533
commit
2de6e0154c
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
|
||||
|
||||
|
5
acl.spec
5
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
|
||||
|
Loading…
Reference in New Issue
Block a user