summaryrefslogtreecommitdiffstats
path: root/package/portmap/portmap-6.0-0004-NO_PERROR-control-overriding-of-perror-symbol.patch
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-01-11 13:00:17 -0500
committerPeter Korsgaard <jacmet@sunsite.dk>2011-01-19 22:18:34 +0100
commit758eff8852ba07fa6b70f17955b288aa484ca674 (patch)
tree3d288bebdeb6ce1f2c4492401aa0e88cc7e69d68 /package/portmap/portmap-6.0-0004-NO_PERROR-control-overriding-of-perror-symbol.patch
parent9bc58a42af830ecccfdb6c1d4f837356567c6386 (diff)
downloadbuildroot-novena-758eff8852ba07fa6b70f17955b288aa484ca674.tar.gz
buildroot-novena-758eff8852ba07fa6b70f17955b288aa484ca674.zip
portmap: add nommu support
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/portmap/portmap-6.0-0004-NO_PERROR-control-overriding-of-perror-symbol.patch')
-rw-r--r--package/portmap/portmap-6.0-0004-NO_PERROR-control-overriding-of-perror-symbol.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/package/portmap/portmap-6.0-0004-NO_PERROR-control-overriding-of-perror-symbol.patch b/package/portmap/portmap-6.0-0004-NO_PERROR-control-overriding-of-perror-symbol.patch
new file mode 100644
index 000000000..665d6a1f9
--- /dev/null
+++ b/package/portmap/portmap-6.0-0004-NO_PERROR-control-overriding-of-perror-symbol.patch
@@ -0,0 +1,65 @@
+From 8cea0778f0fb838a7bd764be08f15e1494e5a0b2 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 19 Nov 2010 23:50:27 -0500
+Subject: [PATCH 4/4] NO_PERROR: control overriding of perror() symbol
+
+Doing static builds of portmap might fail when the C library's perror()
+function is pulled in and collides with portmap's definition. So add a
+flag to control the local override.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 5 +++++
+ README | 1 +
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 9df5574..1635107 100644
+--- a/Makefile
++++ b/Makefile
+@@ -32,6 +32,11 @@ ifneq ($(NO_FORK),)
+ CPPFLAGS += -DNO_FORK
+ endif
+
++# For static builds, we might hit perror() symbol clashes
++ifneq ($(NO_PERROR),)
++CPPFLAGS += -DNO_PERROR
++endif
++
+ # Comment out if your RPC library does not allocate privileged ports for
+ # requests from processes with root privilege, or the new portmap will
+ # always reject requests to register/unregister services on privileged
+diff --git a/README b/README
+index bda1707..05861a8 100644
+--- a/README
++++ b/README
+@@ -19,6 +19,7 @@ There is no "./configure", just use "make".
+ Some make variable can be used to control compilation.
+
+ NO_FORK= if non-empty, don't use fork (good for nommu systems)
++ NO_PERROR= if non-empty, don't override the perror() func
+ NO_PIE= if non-empty, don't build portmap as a PIE
+ NO_TCP_WRAPPER= if non-empty, don't use tcp_wrappers
+ USE_DNS= if set, tcp_wrappers can check peers based on hostname
+diff --git a/portmap.c b/portmap.c
+index 2a98881..94abc64 100644
+--- a/portmap.c
++++ b/portmap.c
+@@ -391,12 +391,14 @@ main(int argc, char **argv)
+ abort();
+ }
+
++#ifndef NO_PERROR
+ /* need to override perror calls in rpc library */
+ void perror(const char *what)
+ {
+
+ syslog(LOG_ERR, "%s: %m", what);
+ }
++#endif
+
+ static struct pmaplist *
+ find_service(u_long prog, u_long vers, u_long prot)
+--
+1.7.3.1
+