]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fixes for OS X 72/572/1
authorDavid M. Lee <dlee@respoke.io>
Tue, 2 Jun 2015 20:07:08 +0000 (15:07 -0500)
committerDavid M. Lee <dlee@respoke.io>
Tue, 2 Jun 2015 21:27:51 +0000 (16:27 -0500)
 * Add some type casting so tv_usec can really be a long, instead of
   some strange platform specific type.

 * Add some .dylib style files to .gitignore.

 * Switch from using -Xlinker to -Wl,. For [reasons unknown][], newer
   versions of GCC, when compiling the Homebrew formula for Asterisk,
   are not properly passing the -Xlinker options to the linker. Given
   that -Wl, does exactly the [same thing][], and does it properly, this
   patch changes the -Xlinker options to use -Wl, instead.

 [reasons unknown]: http://bit.ly/1SUbEYx
 [same thing]: https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html

Change-Id: Id5e6b3c6cc86282ea5fca630dc3991137c5bf4dd

Makefile
codecs/gsm/Makefile
main/.gitignore
main/Makefile
res/res_pjsip/pjsip_options.c
utils/.gitignore

index 24347e4e27862c1951bcf4cafa08f535883c7003..8180a4f8900369882ffe7e6c13d1911548eb8f16 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -261,10 +261,10 @@ MOD_SUBDIRS_MENUSELECT_TREE:=$(MOD_SUBDIRS:%=%-menuselect-tree)
 
 ifneq ($(findstring darwin,$(OSARCH)),)
   _ASTCFLAGS+=-D__Darwin__ -mmacosx-version-min=10.6
-  _SOLINK=-mmacosx-version-min=10.6 -Xlinker -undefined -Xlinker dynamic_lookup
+  _SOLINK=-mmacosx-version-min=10.6 -Wl,-undefined,dynamic_lookup
   _SOLINK+=/usr/lib/bundle1.o
   SOLINK=-bundle $(_SOLINK)
-  DYLINK=-Xlinker -dylib $(_SOLINK)
+  DYLINK=-Wl,-dylib $(_SOLINK)
   _ASTLDFLAGS+=-L/usr/local/lib
 else
 # These are used for all but Darwin
index a072e6d2dd9e9f6f3d59f9467ec9f4e441222187..06f08298394f203219068afc96fc3a83a9c10f26 100644 (file)
@@ -315,7 +315,7 @@ install:    toastinstall gsminstall
 # The basic API: libgsm
 
 $(LIBGSMSO):   $(LIB) $(GSM_OBJECTS)
-               $(LD) -o $@.1.0.10 -shared -Xlinker -soname -Xlinker libgsm.so.1 $(GSM_OBJECTS) -lc
+               $(LD) -o $@.1.0.10 -shared -Wl,-soname,libgsm.so.1 $(GSM_OBJECTS) -lc
                ln -fs libgsm.so.1.0.10 lib/libgsm.so.1
                ln -fs libgsm.so.1.0.10 lib/libgsm.so
 
index 23f5c58bef6a11c7fcb6c5af8480ad8d0edcd2d7..3ff4656798bf156126c87431f6ac8efbb7ca25e1 100644 (file)
@@ -1,3 +1,4 @@
 asterisk
 libasteriskssl.so.1
+libasteriskssl.dylib
 version.c
index c0c0afff23b7d883054efa3eda959654e97f73f1..2c4b576d1017042a7f24d560a4da21be814500a4 100644 (file)
@@ -60,7 +60,7 @@ endif
 
 ifneq ($(findstring darwin,$(OSARCH)),)
   AST_LIBS+=-lresolv
-  ASTLINK=-mmacosx-version-min=10.6 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace
+  ASTLINK=-mmacosx-version-min=10.6 -Wl,-undefined,dynamic_lookup -force_flat_namespace
   ASTLINK+=/usr/lib/bundle1.o
 else
 # These are used for all but Darwin
index bc1e1ece4f4c7ebfb7f6db8554ef48fe095ccc01..f888cc451ade714d1a56cf4764cafa21cd35ae89 100644 (file)
@@ -974,7 +974,7 @@ static int rtt_start_to_str(const void *obj, const intptr_t *args, char **buf)
 {
        const struct ast_sip_contact_status *status = obj;
 
-       if (ast_asprintf(buf, "%ld.%06ld", status->rtt_start.tv_sec, status->rtt_start.tv_usec) == -1) {
+       if (ast_asprintf(buf, "%ld.%06ld", (long)status->rtt_start.tv_sec, (long)status->rtt_start.tv_usec) == -1) {
                return -1;
        }
 
index ed37a064c8016732e4b3295a7d0af6e3fa68c841..8e95c8df8fe2b33a24ca3b61ce9a4c496d8f0e39 100644 (file)
@@ -9,6 +9,7 @@ astdb2bdb
 astdb2sqlite3
 check_expr
 check_expr2
+check_expr2.dSYM/
 conf2ael
 db1-ast/libdb1.a
 hashtab.c