summaryrefslogtreecommitdiff
path: root/patches/source/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/source/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch')
-rw-r--r--patches/source/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/patches/source/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch b/patches/source/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch
new file mode 100644
index 00000000..f7c30794
--- /dev/null
+++ b/patches/source/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch
@@ -0,0 +1,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
+