From 61f25c3e92fb8257ad92a752f05d291e1b267db7 Mon Sep 17 00:00:00 2001 From: Mark Spencer <markster@digium.com> Date: Sun, 19 Dec 2004 17:33:19 +0000 Subject: [PATCH] Merge twisted's OSX compat fix (bug #3090) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4483 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- Makefile | 1 + config.c | 3 +++ pbx/pbx_dundi.c | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index bc3dc1a56a..c3eeac4b77 100755 --- a/Makefile +++ b/Makefile @@ -207,6 +207,7 @@ LIBS+=-lresolv #-lnjamd endif ifeq (${OSARCH},Darwin) LIBS+=-lresolv +CFLAGS+=-D__OSX__ endif ifeq (${OSARCH},FreeBSD) LIBS+=-lcrypto diff --git a/config.c b/config.c index baba870bb1..31f4381580 100755 --- a/config.c +++ b/config.c @@ -19,6 +19,9 @@ #include <time.h> #define AST_INCLUDE_GLOB 1 #ifdef AST_INCLUDE_GLOB +#ifdef __OSX__ +#define GLOB_ABORTED GLOB_ABEND +#endif # include <glob.h> #endif #include <asterisk/config.h> diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index b68a1050ad..602d05605a 100755 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -39,7 +39,7 @@ #include <sys/socket.h> #include <string.h> #include <errno.h> -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(SOLARIS) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(SOLARIS) || defined(__OSX__) #include <sys/types.h> #include <netinet/in_systm.h> #endif @@ -47,7 +47,7 @@ #include <sys/ioctl.h> #include <netinet/in.h> #include <net/if.h> -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OSX__) #include <net/if_dl.h> #include <ifaddrs.h> #endif -- GitLab