Opened 4 years ago

Last modified 3 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: Generic / unclassified Version: OpenVPN git master branch (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: err.h
Cc:

Description

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 (2)

comment:1 Changed 3 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>

+#endif

#include <openvpn-plugin.h>


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

comment:2 Changed 3 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.

Note: See TracTickets for help on using tickets.