blob: 3655a57162ea8d9578db774b53512a1993fbe734 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 5746b68ba9dda87586b3ac88fe84031cbc0015f7 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 May 2018 12:20:03 -0700
4Subject: [PATCH] Link with libtirpc
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 configure | 2 +-
11 rpc.rusersd/rusers_proc.c | 7 +------
12 rpc.rusersd/rusersd.c | 6 +-----
13 rup/rup.c | 2 +-
14 4 files changed, 4 insertions(+), 13 deletions(-)
15
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080016--- a/configure
17+++ b/configure
Brad Bishop26bdd442019-08-16 17:08:17 -040018@@ -92,7 +92,6 @@ else
19 echo -n 'Checking if C compiler works... '
20 if (
21 $CC __conftest.c -o __conftest || exit 1
22- ./__conftest || exit 1
23 ) >/dev/null 2>&1; then
24 echo 'yes'
25 else
26@@ -146,8 +145,7 @@ else
27
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080028 fi
29
Brad Bishop26bdd442019-08-16 17:08:17 -040030-LDFLAGS=
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031-LIBS=
Brad Bishop26bdd442019-08-16 17:08:17 -040032+LIBS="$LIBS -ltirpc"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080033
34 rm -f __conftest*
35
Brad Bishop26bdd442019-08-16 17:08:17 -040036@@ -172,13 +170,11 @@ int main() {
37 EOF
38 if (
39 $CC $CFLAGS __conftest.c -o __conftest || exit 1
40- ./__conftest || exit 1
41 ) >/dev/null 2>&1; then
42 echo 'yes'
43 else
44 if (
45 $CC $CFLAGS -D__USE_BSD_SIGNAL __conftest.c -o __conftest || exit 1
46- ./__conftest || exit 1
47 ) >/dev/null 2>&1; then
48 echo '-D__USE_BSD_SIGNAL'
49 CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL"
50@@ -231,7 +227,6 @@ if (
51 else
52 if (
53 $CC $CFLAGS -D_GNU_SOURCE __conftest.c -o __conftest || exit 1
54- ./__conftest || exit 1
55 ) >/dev/null 2>&1; then
56 echo '-D_GNU_SOURCE'
57 CFLAGS="$CFLAGS -D_GNU_SOURCE"
58@@ -262,20 +257,17 @@ int main() {
59 EOF
60 if (
61 $CC $CFLAGS __conftest.c $LIBBSD -o __conftest || exit 1
62- ./__conftest || exit 1
63 ) >/dev/null 2>&1; then
64 echo 'ok'
65 else
66 if (
67 $CC $CFLAGS __conftest.c -lsnprintf $LIBBSD -o __conftest || exit 1
68- ./__conftest || exit 1
69 ) >/dev/null 2>&1; then
70 echo '-lsnprintf'
71 LIBS="$LIBS -lsnprintf"
72 else
73 if (
74 $CC $CFLAGS __conftest.c -ldb $LIBBSD -o __conftest || exit 1
75- ./__conftest || exit 1
76 ) >/dev/null 2>&1; then
77 echo '-ldb'
78 LIBS="$LIBS -ldb"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080079--- a/rpc.rusersd/rusers_proc.c
80+++ b/rpc.rusersd/rusers_proc.c
81@@ -57,12 +57,7 @@ char rp_rcsid[] =
82 #define RUT_TIME ut_time
83 #endif
84
85-/* Glibc strikes again */
86-#ifdef __GLIBC__
87- #include <rpcsvc/rusers.h>
88-#else
89- #include "rusers.h"
90-#endif
91+#include "rusers.h"
92
93 void rusers_service(struct svc_req *rqstp, SVCXPRT *transp);
94
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080095--- a/rpc.rusersd/rusersd.c
96+++ b/rpc.rusersd/rusersd.c
97@@ -38,11 +38,7 @@ char rusersd_rcsid[] =
98 #include <rpc/pmap_clnt.h>
99 #include <unistd.h>
100 #include <grp.h>
101-#ifdef __GLIBC__
102- #include <rpcsvc/rusers.h>
103-#else
104- #include "rusers.h"
105-#endif
106+#include "rusers.h"
107
108 #include "../version.h"
109
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800110--- a/rup/rup.c
111+++ b/rup/rup.c
Brad Bishop26bdd442019-08-16 17:08:17 -0400112@@ -48,7 +48,7 @@ char rcsid[] = "$Id: rup.c,v 1.8 2000/07
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800113
114 #undef FSHIFT /* Use protocol's shift and scale values */
115 #undef FSCALE
116-#include <rpcsvc/rstat.h>
117+#include "rstat.h"
118
119 #include "../version.h"
120