diff options
author | Michael Tretter <m.tretter@pengutronix.de> | 2019-02-15 11:43:22 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-02-19 14:55:36 +0100 |
commit | c78fa7d7af6b41da9927062597bf45bb8b34475e (patch) | |
tree | a6a917405a17b5d82fd95349f4ab4c6fc5a6b45d /patches | |
parent | fa66d6ec6fea3dd6ef4be1f6f17d2db7c486c851 (diff) | |
download | ptxdist-c78fa7d7af6b41da9927062597bf45bb8b34475e.tar.gz ptxdist-c78fa7d7af6b41da9927062597bf45bb8b34475e.tar.xz |
nfs-utils: add patch to fix building with glibc 2.28
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/nfs-utils-1.3.3/0003-fix-building-w-newer-C-libraries.patch | 79 | ||||
-rw-r--r-- | patches/nfs-utils-1.3.3/series | 3 |
2 files changed, 81 insertions, 1 deletions
diff --git a/patches/nfs-utils-1.3.3/0003-fix-building-w-newer-C-libraries.patch b/patches/nfs-utils-1.3.3/0003-fix-building-w-newer-C-libraries.patch new file mode 100644 index 000000000..c0d974c9c --- /dev/null +++ b/patches/nfs-utils-1.3.3/0003-fix-building-w-newer-C-libraries.patch @@ -0,0 +1,79 @@ +From 4ac4b4f74dcec30dcb23aab827eed152db08daea Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Wed, 27 Apr 2016 12:57:08 -0400 +Subject: [PATCH] fix building w/newer C libraries + +Linux C libraries are moving away from implicitly including the header +sys/sysmacros.h via sys/types.h. We would like to do this for glibc +now, but others (musl/etc...) have been doing it already. This means +any code using major/minor/makedevs functions will fail to build when +they don't include that header. + +Leverage the AC_HEADER_MAJOR macro that configure is already using to +pull in the right header. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +Signed-off-by: Steve Dickson <steved@redhat.com> +--- + support/include/xcommon.h | 6 ++++++ + support/nfs/nfsexport.c | 1 + + utils/blkmapd/device-discovery.c | 1 + + utils/mountd/cache.c | 1 + + 4 files changed, 9 insertions(+) + +diff --git a/support/include/xcommon.h b/support/include/xcommon.h +index d1a4b18..23c9a13 100644 +--- a/support/include/xcommon.h ++++ b/support/include/xcommon.h +@@ -17,6 +17,12 @@ + #include <stdlib.h> + #include <string.h> + ++#ifdef MAJOR_IN_MKDEV ++#include <sys/mkdev.h> ++#elif defined(MAJOR_IN_SYSMACROS) ++#include <sys/sysmacros.h> ++#endif ++ + #define streq(s, t) (strcmp ((s), (t)) == 0) + + /* Functions in sundries.c that are used in mount.c and umount.c */ +diff --git a/support/nfs/nfsexport.c b/support/nfs/nfsexport.c +index afd7c90..4b13265 100644 +--- a/support/nfs/nfsexport.c ++++ b/support/nfs/nfsexport.c +@@ -19,6 +19,7 @@ + + #include "nfslib.h" + #include "misc.h" ++#include "xcommon.h" + + /* if /proc/net/rpc/... exists, then + * write to it, as that interface is more stable. +diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c +index b010628..052d582 100644 +--- a/utils/blkmapd/device-discovery.c ++++ b/utils/blkmapd/device-discovery.c +@@ -51,6 +51,7 @@ + #include <libdevmapper.h> + + #include "device-discovery.h" ++#include "xcommon.h" + + #define EVENT_SIZE (sizeof(struct inotify_event)) + #define EVENT_BUFSIZE (1024 * EVENT_SIZE) +diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c +index 7847446..ec86a22 100644 +--- a/utils/mountd/cache.c ++++ b/utils/mountd/cache.c +@@ -31,6 +31,7 @@ + #include "mountd.h" + #include "fsloc.h" + #include "pseudoflavors.h" ++#include "xcommon.h" + + #ifdef USE_BLKID + #include "blkid/blkid.h" +-- +2.20.1 + diff --git a/patches/nfs-utils-1.3.3/series b/patches/nfs-utils-1.3.3/series index 22cb3322f..512cf9989 100644 --- a/patches/nfs-utils-1.3.3/series +++ b/patches/nfs-utils-1.3.3/series @@ -3,7 +3,8 @@ #tag:upstream --start-number 1 0001-systemd-Decouple-the-starting-and-stopping-of-rpcbin.patch 0002-rpc.c-added-include-file-so-UINT16_MAX-is-defined.patch +0003-fix-building-w-newer-C-libraries.patch #tag:ptxdist --start-number 100 0100-rpcgen-don-t-link-to-libtirpc.patch 0101-allow-installing-all-tools-in-usr.patch -# 9e2fa6772abb1fdd36012b23950e5d18 - git-ptx-patches magic +# 97af92530acbf1a38d73438665f8e71d - git-ptx-patches magic |