summaryrefslogtreecommitdiffstats
path: root/patches/unfs3-0.9.22
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-08-27 22:21:14 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-08-28 16:44:17 +0200
commitc94a5efd80a9db3fb2471d64cef8234a058504cd (patch)
tree49e8e9f1df3aeb0c1255115b6e5e0eba690838fe /patches/unfs3-0.9.22
parentf0f03a3cd9079cb190dbcb8e02ea69744578beb8 (diff)
downloadptxdist-c94a5efd80a9db3fb2471d64cef8234a058504cd.tar.gz
ptxdist-c94a5efd80a9db3fb2471d64cef8234a058504cd.tar.xz
host-unfs3: build with libtirpc if it is available
This is needed to build unfs3 on distributions with a glibc with disabled sunrpc, such as Arch Linux. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches/unfs3-0.9.22')
-rw-r--r--patches/unfs3-0.9.22/0001-HACK-use-the-environment-variable-UNFS_BASE-as-root-.patch4
-rw-r--r--patches/unfs3-0.9.22/0002-fix-unfs3-build-with-recent-versions-of-flex.patch2
-rw-r--r--patches/unfs3-0.9.22/0003-64-bit-fixes-don-t-assume-that-long-is-the-same-size.patch6
-rw-r--r--patches/unfs3-0.9.22/0004-use-libtirpc-if-found.patch51
-rw-r--r--patches/unfs3-0.9.22/series3
5 files changed, 59 insertions, 7 deletions
diff --git a/patches/unfs3-0.9.22/0001-HACK-use-the-environment-variable-UNFS_BASE-as-root-.patch b/patches/unfs3-0.9.22/0001-HACK-use-the-environment-variable-UNFS_BASE-as-root-.patch
index fd10eb65b..846bcae3f 100644
--- a/patches/unfs3-0.9.22/0001-HACK-use-the-environment-variable-UNFS_BASE-as-root-.patch
+++ b/patches/unfs3-0.9.22/0001-HACK-use-the-environment-variable-UNFS_BASE-as-root-.patch
@@ -10,7 +10,7 @@ Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/backend_unix.h b/backend_unix.h
-index 713288d..62dad83 100644
+index 713288da5bef..62dad8336e83 100644
--- a/backend_unix.h
+++ b/backend_unix.h
@@ -23,6 +23,7 @@
@@ -31,7 +31,7 @@ index 713288d..62dad83 100644
#define backend_rename rename
#define backend_rmdir rmdir
diff --git a/readdir.c b/readdir.c
-index 0e7290c..53b0bfc 100644
+index 0e7290c68ae8..53b0bfc9e7dd 100644
--- a/readdir.c
+++ b/readdir.c
@@ -213,3 +213,19 @@ READDIR3res read_dir(const char *path, cookie3 cookie, cookieverf3 verf,
diff --git a/patches/unfs3-0.9.22/0002-fix-unfs3-build-with-recent-versions-of-flex.patch b/patches/unfs3-0.9.22/0002-fix-unfs3-build-with-recent-versions-of-flex.patch
index 264395634..25512fc56 100644
--- a/patches/unfs3-0.9.22/0002-fix-unfs3-build-with-recent-versions-of-flex.patch
+++ b/patches/unfs3-0.9.22/0002-fix-unfs3-build-with-recent-versions-of-flex.patch
@@ -8,7 +8,7 @@ Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
1 file changed, 2 insertions(+)
diff --git a/Config/exports.l b/Config/exports.l
-index 8a2d6d1..8aa2011 100644
+index 8a2d6d1d2f15..8aa2011932a6 100644
--- a/Config/exports.l
+++ b/Config/exports.l
@@ -36,6 +36,8 @@ static void copy_text(const char *from, int leng)
diff --git a/patches/unfs3-0.9.22/0003-64-bit-fixes-don-t-assume-that-long-is-the-same-size.patch b/patches/unfs3-0.9.22/0003-64-bit-fixes-don-t-assume-that-long-is-the-same-size.patch
index c4087c8f0..0676d9394 100644
--- a/patches/unfs3-0.9.22/0003-64-bit-fixes-don-t-assume-that-long-is-the-same-size.patch
+++ b/patches/unfs3-0.9.22/0003-64-bit-fixes-don-t-assume-that-long-is-the-same-size.patch
@@ -21,7 +21,7 @@ Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
3 files changed, 34 insertions(+), 15 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 023b296..cf1d9d1 100644
+index 023b296c368c..cf1d9d107c82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,9 @@ AC_CHECK_TYPES(int64,,,[#include <sys/inttypes.h>])
@@ -36,7 +36,7 @@ index 023b296..cf1d9d1 100644
AC_CHECK_FUNCS(statvfs)
AC_CHECK_FUNCS(seteuid setegid)
diff --git a/nfs.h b/nfs.h
-index 63041fa..b3a94ed 100644
+index 63041fa09166..b3a94ede970e 100644
--- a/nfs.h
+++ b/nfs.h
@@ -54,20 +54,12 @@ typedef int64_t int64;
@@ -61,7 +61,7 @@ index 63041fa..b3a94ed 100644
typedef char *filename3;
diff --git a/xdr.c b/xdr.c
-index 21e5ea7..6aa100c 100644
+index 21e5ea702148..6aa100c80663 100644
--- a/xdr.c
+++ b/xdr.c
@@ -192,22 +192,47 @@ bool_t xdr_uint64(XDR * xdrs, uint64 * objp)
diff --git a/patches/unfs3-0.9.22/0004-use-libtirpc-if-found.patch b/patches/unfs3-0.9.22/0004-use-libtirpc-if-found.patch
new file mode 100644
index 000000000..d0ef870d0
--- /dev/null
+++ b/patches/unfs3-0.9.22/0004-use-libtirpc-if-found.patch
@@ -0,0 +1,51 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 27 Aug 2019 21:42:24 +0200
+Subject: [PATCH] use libtirpc if found
+
+sunrpc was deprecated in glibc a long time ago. Some distributions, for
+example Arch Linux, have disabled sunrpc. As a result building fails.
+
+Use libtirpc if it is available. Use sunrpc otherwise.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ configure.ac | 3 +++
+ daemon.c | 4 ++--
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index cf1d9d107c82..668fbda2f0be 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -9,6 +9,9 @@ AC_SYS_LARGEFILE
+ AC_SEARCH_LIBS(xdr_int, nsl)
+ AC_SEARCH_LIBS(socket, socket)
+ AC_SEARCH_LIBS(inet_aton, resolv)
++PKG_CHECK_MODULES([TIRPC], [libtirpc],
++ [CFLAGS="$CFLAGS $TIRPC_CFLAGS"
++ LIBS="$LIBS $TIRPC_LIBS"],[:])
+ AC_CHECK_HEADERS(mntent.h,,,[#include <stdio.h>])
+ AC_CHECK_HEADERS(stdint.h,,,[#include <stdio.h>])
+ AC_CHECK_HEADERS(sys/mnttab.h,,,[#include <stdio.h>])
+diff --git a/daemon.c b/daemon.c
+index d14af4509b12..7890f71b8758 100644
+--- a/daemon.c
++++ b/daemon.c
+@@ -110,7 +110,7 @@ void logmsg(int prio, const char *fmt, ...)
+ */
+ struct in_addr get_remote(struct svc_req *rqstp)
+ {
+- return (svc_getcaller(rqstp->rq_xprt))->sin_addr;
++ return ((struct sockaddr_in *)svc_getcaller(rqstp->rq_xprt))->sin_addr;
+ }
+
+ /*
+@@ -118,7 +118,7 @@ struct in_addr get_remote(struct svc_req *rqstp)
+ */
+ short get_port(struct svc_req *rqstp)
+ {
+- return (svc_getcaller(rqstp->rq_xprt))->sin_port;
++ return ((struct sockaddr_in *)svc_getcaller(rqstp->rq_xprt))->sin_port;
+ }
+
+ /*
diff --git a/patches/unfs3-0.9.22/series b/patches/unfs3-0.9.22/series
index ed7d9b998..3c8683ef5 100644
--- a/patches/unfs3-0.9.22/series
+++ b/patches/unfs3-0.9.22/series
@@ -3,4 +3,5 @@
0001-HACK-use-the-environment-variable-UNFS_BASE-as-root-.patch
0002-fix-unfs3-build-with-recent-versions-of-flex.patch
0003-64-bit-fixes-don-t-assume-that-long-is-the-same-size.patch
-# cbc0b51ceb8d5bce30bc87ed263015da - git-ptx-patches magic
+0004-use-libtirpc-if-found.patch
+# b3936a9a6ca0c9fd1c164603ca1d2064 - git-ptx-patches magic