Hide warnings due to Apple's stupidity with __dead, reported by Kurtis Rader.

pull/2378/head
Nicholas Marriott 2020-09-04 08:36:34 +01:00
parent 2e931d4994
commit 233d14f4da
2 changed files with 10 additions and 0 deletions

View File

@ -35,6 +35,10 @@
#define __attribute__(a)
#endif
#ifdef BROKEN___DEAD
#undef __dead
#endif
#ifndef __unused
#define __unused __attribute__ ((__unused__))
#endif

View File

@ -550,6 +550,12 @@ case "$host_os" in
AC_MSG_RESULT(darwin)
PLATFORM=darwin
#
# OS X uses __dead2 instead of __dead, like FreeBSD. But it
# defines __dead away so it needs to be removed before we can
# replace it.
#
AC_DEFINE(BROKEN___DEAD)
#
# OS X CMSG_FIRSTHDR is broken, so redefine it with a working
# one. daemon works but has some stupid side effects, so use
# our internal version which has a workaround.