aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch
blob: 3655a57162ea8d9578db774b53512a1993fbe734 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
From 5746b68ba9dda87586b3ac88fe84031cbc0015f7 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 11 May 2018 12:20:03 -0700
Subject: [PATCH] Link with libtirpc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending

 configure                 | 2 +-
 rpc.rusersd/rusers_proc.c | 7 +------
 rpc.rusersd/rusersd.c     | 6 +-----
 rup/rup.c                 | 2 +-
 4 files changed, 4 insertions(+), 13 deletions(-)

--- a/configure
+++ b/configure
@@ -92,7 +92,6 @@ else
     echo -n 'Checking if C compiler works... '
     if (
           $CC __conftest.c -o __conftest || exit 1
-          ./__conftest || exit 1
        ) >/dev/null 2>&1; then
          echo 'yes'
      else
@@ -146,8 +145,7 @@ else
 
 fi
 
-LDFLAGS=
-LIBS=
+LIBS="$LIBS -ltirpc"
 
 rm -f __conftest*
 
@@ -172,13 +170,11 @@ int main() {
 EOF
 if (
       $CC $CFLAGS  __conftest.c  -o __conftest || exit 1
-      ./__conftest || exit 1
    ) >/dev/null 2>&1; then
     echo 'yes'
 else
     if (
           $CC $CFLAGS -D__USE_BSD_SIGNAL __conftest.c  -o __conftest || exit 1
-          ./__conftest || exit 1
        ) >/dev/null 2>&1; then
         echo '-D__USE_BSD_SIGNAL'
         CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL"
@@ -231,7 +227,6 @@ if (
 else
     if (
           $CC $CFLAGS -D_GNU_SOURCE __conftest.c  -o __conftest || exit 1
-          ./__conftest || exit 1
        ) >/dev/null 2>&1; then
         echo '-D_GNU_SOURCE'
         CFLAGS="$CFLAGS -D_GNU_SOURCE"
@@ -262,20 +257,17 @@ int main() {
 EOF
 if (
       $CC $CFLAGS  __conftest.c $LIBBSD -o __conftest || exit 1
-      ./__conftest || exit 1
    ) >/dev/null 2>&1; then
     echo 'ok'
 else
     if (
           $CC $CFLAGS  __conftest.c -lsnprintf $LIBBSD -o __conftest || exit 1
-          ./__conftest || exit 1
        ) >/dev/null 2>&1; then
         echo '-lsnprintf'
         LIBS="$LIBS -lsnprintf"
     else
         if (
               $CC $CFLAGS  __conftest.c -ldb $LIBBSD -o __conftest || exit 1
-              ./__conftest || exit 1
            ) >/dev/null 2>&1; then
             echo '-ldb'
             LIBS="$LIBS -ldb"
--- a/rpc.rusersd/rusers_proc.c
+++ b/rpc.rusersd/rusers_proc.c
@@ -57,12 +57,7 @@ char rp_rcsid[] =
 	#define RUT_TIME ut_time
 #endif
 
-/* Glibc strikes again */
-#ifdef __GLIBC__
-	#include <rpcsvc/rusers.h>
-#else
-	#include "rusers.h"
-#endif 
+#include "rusers.h"
 
 void rusers_service(struct svc_req *rqstp, SVCXPRT *transp);
 
--- a/rpc.rusersd/rusersd.c
+++ b/rpc.rusersd/rusersd.c
@@ -38,11 +38,7 @@ char rusersd_rcsid[] =
 #include <rpc/pmap_clnt.h>
 #include <unistd.h>
 #include <grp.h>
-#ifdef __GLIBC__
-	#include <rpcsvc/rusers.h>
-#else
-	#include "rusers.h"
-#endif
+#include "rusers.h"
 
 #include "../version.h"
 
--- a/rup/rup.c
+++ b/rup/rup.c
@@ -48,7 +48,7 @@ char rcsid[] = "$Id: rup.c,v 1.8 2000/07
 
 #undef FSHIFT			/* Use protocol's shift and scale values */
 #undef FSCALE
-#include <rpcsvc/rstat.h>
+#include "rstat.h"
 
 #include "../version.h"