summaryrefslogtreecommitdiff
path: root/sys-apps/xinetd/files/xinetd-2.3.15.3-no-rpc.patch
blob: 3bd995a0892dbe6681de249a666f3c4dae56d657 (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
https://github.com/openSUSE/xinetd/pull/8

From 4278495b1858b5b1ce94d72bd619eb79aab8ca04 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 18 Jun 2018 18:49:38 -0400
Subject: [PATCH] fix no-rpc builds

The code base already has support for -DNO_RPC, so fix the breakage
introduced by commit 56520dcc88c35113877c8f4f52bd98ad95b44653.
---
 src/confparse.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/confparse.c b/src/confparse.c
index 5b149dd03808..7965cc405f24 100644
--- a/src/confparse.c
+++ b/src/confparse.c
@@ -13,10 +13,12 @@
 #include <stdlib.h>
 #include <fcntl.h>
 #include <unistd.h>
+#ifndef NO_RPC
 #include <rpc/rpc.h>
 #ifdef HAVE_RPCENT_H
 #include <rpc/rpcent.h>
 #endif
+#endif
 #include <netdb.h>
 
 #include "str.h"
@@ -730,7 +732,7 @@ static status_e check_entry( struct service_config *scp,
 	   }
    }
 
-/* #ifndef NO_RPC */
+#ifndef NO_RPC
    if ( SC_IS_RPC( scp ) && !SC_IS_UNLISTED( scp ) )
    {
       struct rpcent *rep = (struct rpcent *)getrpcbyname( SC_NAME(scp) ) ;
@@ -743,6 +745,7 @@ static status_e check_entry( struct service_config *scp,
       SC_RPCDATA( scp )->rd_program_number = rep->r_number ;
    }
    else
+#endif
    {
        if ( !SC_IS_UNLISTED( scp ) ) 
        { 
-- 
2.16.1