Opened 4 years ago

Closed 4 years ago

#750 closed Bug / Defect (fixed)

--multihome on OpenSolaris needs -D_XPG4_2

Reported by: Gert Döring Owned by: Gert Döring
Priority: minor Milestone: release 2.4
Component: Generic / unclassified Version: OpenVPN git master branch (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc:

Description

the header definitions we need are protected

#if defined(_XPG4_2)
/*
 * The cmsg headers (and macros dealing with them) were made available as
 * part of UNIX95 and hence need to be protected with a _XPG4_2 define.
 */
...
/* Amount of space + padding needed for a message of length l */
#define CMSG_SPACE(l)                                                   \
        ((unsigned int)_CMSG_HDR_ALIGN(sizeof (struct cmsghdr) + (l)))

when adding that to CFLAGS, --multihome works nicely both for IPv4 and IPv6 (both "master as of today" and with the fix for trac #634).

So basically this is just a bit of "adding stuff to autoconf", "googling" and testing...

Change History (1)

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

Resolution: fixed
Status: newclosed

commit 6eaa70e80aea7dfd1b3114fcb369a8f72c19ceee
Author: Gert Doering
Date: Mon Oct 10 09:39:31 2016 +0200

Enable -D_SVR4_2 for compilation on Solaris

Signed-off-by: Gert Doering <gert@…>
Acked-by: Arne Schwabe <arne@…>
Message-Id: <20161010073931.54469-1-gert@…>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg12

634.html

Note: See TracTickets for help on using tickets.