Opened 13 years ago
Closed 11 years ago
#192 closed Bug / Defect ( fixed )
MacOS X build fails
| Reported by: | Samuli Seppänen | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | release 2.3 |
| Component: | Building / Compiling | Version: | OpenVPN 2.2.2 (Community Ed) |
| Severity: | Not set (select this one, unless your'e a OpenVPN developer) | Keywords: | mac osx build |
| Cc: |
Description
In file syshead.h there is this:
/*
* Does this platform support linux-style IP_PKTINFO?
*/
#if defined(ENABLE_MULTIHOME) && defined(HAVE_IN_PKTINFO) && defined(IP_PKTINFO) && defined(HAVE_MSGHDR) && defined(HAVE_CMSGHDR) && defined(HAVE_IOVEC) && defined(CMSG_FIRSTHDR) && defined(CMSG_NXTHDR) && defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG)
#define ENABLE_IP_PKTINFO 1
#else
#define ENABLE_IP_PKTINFO 0
#endif
While compiling under MacOS X 10.7 (Lion), this results in ENABLE_IP_PKTINFO = 1
but while compiling socket.c this part fails:
static socket_descriptor_t
create_socket_udp (const unsigned int flags)
{
socket_descriptor_t sd;
if ((sd = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
msg (M_SOCKERR, "UDP: Cannot create UDP socket");
#if ENABLE_IP_PKTINFO
else if (flags & SF_USE_IP_PKTINFO)
{
int pad = 1;
setsockopt (sd, SOL_IP, IP_PKTINFO, (void*)&pad, sizeof(pad));
}
#endif
return sd;
}
It fails because IP_PKTINFO is not defined.
In other words ENABLE_IP_PKTINFO should be 0 under MacOS X.
Hardcoding it in syshead.h made the compile issue go away.
Change History (5)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
| Version: | 2.2.1 → 2.2.2 |
|---|
comment:3 Changed 13 years ago by
| Milestone: | → release 2.2.3 |
|---|
comment:4 Changed 13 years ago by
| Milestone: | release 2.2.3 → release 2.3 |
|---|
comment:5 Changed 11 years ago by
| Keywords: | mac osx build added |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
OpenVPN builds fine on MacOS X, so this bug was fixed at some point. Closing.
This bug report was sent via email because the user had issues with Trac authorization.