From: Wouter Wijngaards Date: Tue, 26 Jan 2016 14:11:39 +0000 (+0000) Subject: - Fix cmsg alignment for argument to sendmsg on NetBSD. X-Git-Tag: release-1.5.8~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=303fbcdc475700a1b4d5f0435e32a986ad14252c;p=thirdparty%2Funbound.git - Fix cmsg alignment for argument to sendmsg on NetBSD. git-svn-id: file:///svn/unbound/trunk@3608 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 1c8221018..c778a1616 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,7 @@ - Fix #734: chown the pidfile if it resides inside the chroot. - Use arc4random instead of random in tests (because it is available, possibly as compat, anyway). + - Fix cmsg alignment for argument to sendmsg on NetBSD. 25 January 2016: Wouter - Fix #738: Swig should not be invoked with CPPFLAGS. diff --git a/util/netevent.c b/util/netevent.c index 614446806..1f182a025 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -56,7 +56,9 @@ /* -------- Start of local definitions -------- */ /** if CMSG_ALIGN is not defined on this platform, a workaround */ #ifndef CMSG_ALIGN -# ifdef _CMSG_DATA_ALIGN +# ifdef __CMSG_ALIGN +# define CMSG_ALIGN(n) __CMSG_ALIGN(n) +# elif defined(CMSG_DATA_ALIGN) # define CMSG_ALIGN _CMSG_DATA_ALIGN # else # define CMSG_ALIGN(len) (((len)+sizeof(long)-1) & ~(sizeof(long)-1))