From: Matthew Jordan Date: Thu, 17 Apr 2014 20:06:11 +0000 (+0000) Subject: main/Makefile: Fix build failure on SmartOS/Illumos/SunOS X-Git-Tag: 11.10.0-rc1~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d78c26ac978859584575d3de442baf1fe8140e85;p=thirdparty%2Fasterisk.git main/Makefile: Fix build failure on SmartOS/Illumos/SunOS This patch fixes two issues when building on SmartOS: - channels/chan_oss.c: it makes sure soundcard.h is found - main/Makefile: only use "-Wl,--version-script" when GNU LD is used as the Sun Linker doesn't support that. Similar checks are already used elswhere in the Makefile Review: https://reviewboard.asterisk.org/r/3426 ASTERISK-23576 #close Reported by: Sebastian Wiedenroth patches: fix-sunos.diff uploaded by Sebastian Wiedenroth (License 6597) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412468 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_oss.c b/channels/chan_oss.c index 0e3b02b692..f98dc4ef6b 100644 --- a/channels/chan_oss.c +++ b/channels/chan_oss.c @@ -48,7 +48,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #ifdef __linux #include -#elif defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__GLIBC__) +#elif defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__GLIBC__) || defined(__sun) #include #else #include diff --git a/main/Makefile b/main/Makefile index 07829fe377..e563ffd464 100644 --- a/main/Makefile +++ b/main/Makefile @@ -202,7 +202,9 @@ ASTSSL_LIB:=libasteriskssl.so $(ASTSSL_LIB).$(ASTSSL_SO_VERSION): _ASTLDFLAGS+=-Wl,-soname=$(ASTSSL_LIB).$(ASTSSL_SO_VERSION) $(ASTSSL_LIB).$(ASTSSL_SO_VERSION): _ASTCFLAGS+=-fPIC -DAST_MODULE=\"asteriskssl\" $(ASTSSL_LIB).$(ASTSSL_SO_VERSION): LIBS+=$(ASTSSL_LIBS) -$(ASTSSL_LIB).$(ASTSSL_SO_VERSION): SO_SUPPRESS_SYMBOLS=-Wl,--version-script,libasteriskssl.exports,--warn-common +ifeq ($(GNU_LD),1) + $(ASTSSL_LIB).$(ASTSSL_SO_VERSION): SO_SUPPRESS_SYMBOLS=-Wl,--version-script,libasteriskssl.exports,--warn-common +endif $(ASTSSL_LIB).$(ASTSSL_SO_VERSION): SOLINK=$(DYLINK) # These rules are duplicated from $(ASTTOPDIR)/Makefile.rules because the library name