Skip to contentSkip to conversation

plugin-down-root: only include <err.h> if system has it.

PATCH In review Gert Doering 2 participants 3 messages Apr 30, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 plugin-down-root: only include <err.h> if system has it.

down-root.c was missing an #ifdef HAVE_ERR_H around <err.h> (only relevant on AIX, it seems)

Trac #495

---
 src/plugins/down-root/down-root.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
src/plugins/down-root/down-root.c +2 -0
index 6931bec..42db064 100644
@@ -42,7 +42,9 @@
 #include <signal.h>
 #include <syslog.h>
 #include <errno.h>
+#ifdef HAVE_ERR_H
 #include <err.h>
+#endif
 
 #include <openvpn-plugin.h>
 
Signature · 1 line
1.6.4
#1 lore raw

Hi,

Quoted 2 lines · Gert Doering

down-root.c was missing an #ifdef HAVE_ERR_H around <err.h> (only relevant on AIX, it seems)

Ignore that patch, please. While it makes the compile error go away, of course it will (sometimes... wtf?!) lead to a link error, as err() and warn() are not there either...

New patch not using err()/warn() coming.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#2 lore raw
In reply to Gert Doering

Am 30.04.15 um 15:02 schrieb Gert Doering:

Quoted 15 lines

down-root.c was missing an #ifdef HAVE_ERR_H around <err.h> (only relevant on AIX, it seems)

Trac #495

---
 src/plugins/down-root/down-root.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
src/plugins/down-root/down-root.c +0 -0
index 6931bec..42db064 100644

src/plugins/down-root/down-root.c line 50

Quoted 9 lines
src/plugins/down-root/down-root.c +2 -0
@@ -42,7 +42,9 @@
 #include <signal.h>
 #include <syslog.h>
 #include <errno.h>
+#ifdef HAVE_ERR_H
 #include <err.h>
+#endif
 
 #include <openvpn-plugin.h>
 

ACK.

Arne