diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-09-27 22:40:47 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-09-28 14:18:53 +0200 |
commit | cae17a015d717d84a6e004456c910d1194fd9040 (patch) | |
tree | 1eb0e6e2e5a9b70f2595df035435431b989f9a42 /patches | |
parent | 0af63a84b23f089b7b48c7cf2f77ec1fa4ee8cdd (diff) | |
download | ptxdist-cae17a015d717d84a6e004456c910d1194fd9040.tar.gz ptxdist-cae17a015d717d84a6e004456c910d1194fd9040.tar.xz |
unfs3: fix libtirpc patch
There seems to be a slightly different behaviour to Sun RPC.
Without this listen() is never called and unfsd runs in a busy loop.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/unfs3-0.9.22/0004-use-libtirpc-if-found.patch | 17 |
1 files changed, 14 insertions, 3 deletions
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 index d0ef870d0..17390362a 100644 --- a/patches/unfs3-0.9.22/0004-use-libtirpc-if-found.patch +++ b/patches/unfs3-0.9.22/0004-use-libtirpc-if-found.patch @@ -7,11 +7,14 @@ example Arch Linux, have disabled sunrpc. As a result building fails. Use libtirpc if it is available. Use sunrpc otherwise. +libtirpc will not listen if the socket is already bound, so do it before +calling svctcp_create(). + Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> --- configure.ac | 3 +++ - daemon.c | 4 ++-- - 2 files changed, 5 insertions(+), 2 deletions(-) + daemon.c | 5 +++-- + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index cf1d9d107c82..668fbda2f0be 100644 @@ -28,7 +31,7 @@ index cf1d9d107c82..668fbda2f0be 100644 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 +index d14af4509b12..fbd901f5e19d 100644 --- a/daemon.c +++ b/daemon.c @@ -110,7 +110,7 @@ void logmsg(int prio, const char *fmt, ...) @@ -49,3 +52,11 @@ index d14af4509b12..7890f71b8758 100644 } /* +@@ -779,6 +779,7 @@ static SVCXPRT *create_tcp_transport(unsigned int port) + fprintf(stderr, "Couldn't bind to tcp port %d\n", port); + exit(1); + } ++ listen(sock, SOMAXCONN); + } + + transp = svctcp_create(sock, 0, 0); |