summaryrefslogtreecommitdiffstats
path: root/source/n/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch
blob: f7c307942bc0a906dc9be2f0a89bc3e680f55150 (about) (plain) (blame)
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
From c0e38c9fd1b2c6785af90c86b26a07724c2488e8 Mon Sep 17 00:00:00 2001
From: Nick Alcock <nick.alcock@oracle.com>
Date: Thu, 25 May 2017 12:45:35 -0400
Subject: [PATCH 4/6] rpcbind: fix building without --enable-debug

All if (debugging) stanzas and their accompanying xlog()s and aborts
should be within #ifdef RPCBIND_DEBUG.

Fixes a compilation failure due to non-inclusion of <syslog.h> in the
non-debugging case.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
 src/pmap_svc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/pmap_svc.c b/src/pmap_svc.c
index 26c31d0..a53dd5f 100644
--- a/src/pmap_svc.c
+++ b/src/pmap_svc.c
@@ -263,12 +263,14 @@ done_change:
 		rpcbs_unset(RPCBVERS_2_STAT, ans);
 done:
 	if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
+#ifdef RPCBIND_DEBUG
 		if (debugging) {
 			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
 			if (doabort) {
 				rpcbind_abort();
 			}
 		}
+#endif
 	}
 	return (rc);
 }
@@ -347,12 +349,14 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
 
 done:
 	if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
+#ifdef RPCBIND_DEBUG
 		if (debugging) {
 			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
 			if (doabort) {
 				rpcbind_abort();
 			}
 		}
+#endif
 	}
 	return (rc);
 }
@@ -385,12 +389,14 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
 
 done:
 	if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) {
+#ifdef RPCBIND_DEBUG
 		if (debugging) {
 			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
 			if (doabort) {
 				rpcbind_abort();
 			}
 		}
+#endif
 	}
 	return (rc);
 }
-- 
2.13.0