Opened 9 years ago

Last modified 4 years ago

#495 accepted Bug / Defect

src/plugins/down-root/down-root.c should not include <err.h> directly

Reported by: bluestonechina Owned by: Gert Döring
Priority: minor Milestone:
Component: plug-ins / plug-in API Version: OpenVPN git master branch (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: err.h, AIX


configure script will detect the existence of <err.h> , if <err.h> exist, down-root.c will include ith with config.h, if err.h is exist, it should not use err() and warn() from err.h.

This bug cause openvpn fail to build on AIX platform with default configure option. us '--disable-plugin-down-root' is a workaround.

Change History (3)

comment:1 Changed 9 years ago by Gert Döring

Owner: set to Gert Döring
Status: newaccepted

Patch is trivial...

--- a/src/plugins/down-root/down-root.c
+++ b/src/plugins/down-root/down-root.c
@@ -42,7 +42,9 @@

#include <signal.h>
#include <syslog.h>
#include <errno.h>

+#ifdef HAVE_ERR_H

#include <err.h>


#include <openvpn-plugin.h>

... has been sent to the list for review and ACK, will be merged to git/master.

comment:2 Changed 9 years ago by Gert Döring

Uh, ignore that, it's a bit more complex - while it will compile with that patch, it will not actually link, given that err() and warn() are missing from the library as well.

comment:3 Changed 4 years ago by Gert Döring

Component: Generic / unclassifiedplug-ins / plug-in API
Keywords: AIX added

Will revisit this eventually when returning to the AIX port.

Note: See TracTickets for help on using tickets.