[libexplain] Fix FTBFS on aarch64 and ppc64 (#1111453)
Yaakov Selkowitz
yselkowitz at fedoraproject.org
Tue Jul 8 05:12:25 UTC 2014
commit 85c5794a373e4dc2b1ef3b8f1c01305fd7bc311b
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date: Tue Jul 8 00:12:15 2014 -0500
Fix FTBFS on aarch64 and ppc64 (#1111453)
libexplain-1.4-largefile.patch | 17 +++++++++++++++++
libexplain-1.4-syscall.patch | 33 +++++++++++++++++++++++++++++++++
libexplain.spec | 9 ++++++++-
3 files changed, 58 insertions(+), 1 deletions(-)
---
diff --git a/libexplain-1.4-largefile.patch b/libexplain-1.4-largefile.patch
new file mode 100644
index 0000000..1878f26
--- /dev/null
+++ b/libexplain-1.4-largefile.patch
@@ -0,0 +1,17 @@
+--- a/libexplain/ac/fcntl.h
++++ b/libexplain/ac/fcntl.h
+@@ -65,8 +65,14 @@
+ * flags values returned by the kernel.
+ */
+ #if defined(__linux__) && (O_LARGEFILE == 0)
++#if defined(__aarch64__)
++#define O_LARGEFILE_HIDDEN 0400000
++#elif defined(__powerpc64__)
++#define O_LARGEFILE_HIDDEN 0200000
++#else
+ #define O_LARGEFILE_HIDDEN 0100000
+ #endif
++#endif
+
+
+ /*
diff --git a/libexplain-1.4-syscall.patch b/libexplain-1.4-syscall.patch
new file mode 100644
index 0000000..98dd9c9
--- /dev/null
+++ b/libexplain-1.4-syscall.patch
@@ -0,0 +1,33 @@
+--- a/explain/syscall/ustat.c
++++ b/explain/syscall/ustat.c
+@@ -30,7 +30,7 @@
+ #include <explain/syscall/ustat.h>
+
+
+-#ifndef HAVE_USTAT
++#if !defined(HAVE_USTAT_H) && !defined(LINUX_TYPES_H_STRUCT_USTAT)
+
+ struct ustat
+ {
+--- a/libexplain/buffer/enfile.c
++++ b/libexplain/buffer/enfile.c
+@@ -38,7 +38,7 @@ get_maxfile(void)
+ {
+ if (explain_option_dialect_specific())
+ {
+-#ifdef __linux__
++#ifdef SYS__sysctl
+ /*
+ * In the linux kernel, if get_empty_filp() returns NULL, the open
+ * system call (and others) will return ENFILE.
+--- a/libexplain/buffer/errno/listen.c
++++ b/libexplain/buffer/errno/listen.c
+@@ -72,7 +72,7 @@ append_getsockname(explain_string_buffer_t *sb, int fildes)
+ static int
+ get_somaxconn(void)
+ {
+-#ifdef __linux__
++#ifdef SYS__sysctl
+ struct __sysctl_args args;
+ long somaxconn;
+ size_t somaxconn_size = sizeof(somaxconn);
diff --git a/libexplain.spec b/libexplain.spec
index d47d914..6147b8b 100644
--- a/libexplain.spec
+++ b/libexplain.spec
@@ -1,10 +1,12 @@
Name: libexplain
Version: 1.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Library functions to explain system call errors
URL: http://libexplain.sourceforge.net
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+Patch0: libexplain-1.4-syscall.patch
+Patch1: libexplain-1.4-largefile.patch
License: LGPLv3+
Group: System Environment/Libraries
@@ -46,6 +48,8 @@ Development files for the libexplain library.
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
# In some releases of libexplain, some tests fail in a way that does
# not indicate a fault in libexplain. Skip those tests. Note that
@@ -129,6 +133,9 @@ install -m 0664 README LICENSE %{buildroot}%{_pkgdocdir}
# provides a wrapper for mktemp, not because it is used.
%changelog
+* Tue Jul 01 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 1.4-2
+- Fix FTBFS on aarch64 and ppc64 (#1111453)
+
* Mon Jun 30 2014 Eric Smith <brouhaha at fedoraproject.org> - 1.4-1
- Updated to latest upstream.
More information about the scm-commits
mailing list