Opened 12 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


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)

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");
  else if (flags & SF_USE_IP_PKTINFO)
      int pad = 1;
      setsockopt (sd, SOL_IP, IP_PKTINFO, (void*)&pad, sizeof(pad));
  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 12 years ago by Samuli Seppänen

This bug report was sent via email because the user had issues with Trac authorization.

comment:2 Changed 12 years ago by Samuli Seppänen


comment:3 Changed 12 years ago by Samuli Seppänen

Milestone: release 2.2.3

comment:4 Changed 12 years ago by David Sommerseth

Milestone: release 2.2.3release 2.3

comment:5 Changed 11 years ago by Samuli Seppänen

Keywords: mac osx build added
Resolution: fixed
Status: newclosed

OpenVPN builds fine on MacOS X, so this bug was fixed at some point. Closing.

Note: See TracTickets for help on using tickets.