]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
build: Various OpenBSD issues 65/4465/1
authorGeorge Joseph <gjoseph@digium.com>
Thu, 17 Nov 2016 02:24:08 +0000 (19:24 -0700)
committerGeorge Joseph <gjoseph@digium.com>
Thu, 17 Nov 2016 02:34:20 +0000 (19:34 -0700)
OpenBSD's 'find' doesn't take the -delete argument so you have to pipe
through 'xargs rm -rf'.

'echo -e' doesn't like \t starting a line. It just prints 't' which
causes the libasteriskpj.exports file to be garbage.  They were just
cosmetic so they were removed.

librt doesn't exist so the link of libasteriskpj.so fails. It's not
actually needed for linux anyway so -lrt was removed from the link.

res_rtp_asterisk was failing to load because of an undefined
DTLS_method. '|| defined(LIBRESSL_VERSION_NUMBER)' was added to the #if
so DTLSv1_method is used instead.

ASTERISK-26608

Change-Id: I926ec95b0b69633231e3ad1d6e803b977272c49c

main/Makefile
res/res_rtp_asterisk.c
third-party/pjproject/Makefile

index e0b7135a10daeb70ebffe11a8ad220be958b1392..df9a01cc41bc439a4f7c3412c7233dfef04e37f3 100644 (file)
@@ -279,15 +279,15 @@ ASTPJ_LIB:=libasteriskpj.so
 libasteriskpj.exports: $(ASTTOPDIR)/$(PJPROJECT_DIR)/pjproject.symbols
        $(ECHO_PREFIX) echo "   [GENERATE] libasteriskpj.exports"
 ifeq ($(GNU_LD),1)
-       $(CMD_PREFIX) echo -e "{\n\tglobal:" > libasteriskpj.exports
-       $(CMD_PREFIX) sed -r -e "s/.*/\t\t$(LINKER_SYMBOL_PREFIX)&;/" $(ASTTOPDIR)/$(PJPROJECT_DIR)/pjproject.symbols >> libasteriskpj.exports
-       $(CMD_PREFIX) echo -e "\t\t$(LINKER_SYMBOL_PREFIX)ast_pj_init;\n" >> libasteriskpj.exports
-       $(CMD_PREFIX) echo -e "\tlocal:\n\t\t*;\n};" >> libasteriskpj.exports
+       $(CMD_PREFIX) echo -e "{\nglobal:" > libasteriskpj.exports
+       $(CMD_PREFIX) sed -r -e "s/.*/$(LINKER_SYMBOL_PREFIX)&;/" $(ASTTOPDIR)/$(PJPROJECT_DIR)/pjproject.symbols >> libasteriskpj.exports
+       $(CMD_PREFIX) echo -e "$(LINKER_SYMBOL_PREFIX)ast_pj_init;\n" >> libasteriskpj.exports
+       $(CMD_PREFIX) echo -e "local:\n*;\n};" >> libasteriskpj.exports
 endif
 
 $(ASTPJ_LIB).$(ASTPJ_SO_VERSION): _ASTLDFLAGS+=-Wl,-soname=$(ASTPJ_LIB) $(PJ_LDFLAGS)
 $(ASTPJ_LIB).$(ASTPJ_SO_VERSION): _ASTCFLAGS+=-fPIC -DAST_MODULE=\"asteriskpj\" $(PJ_CFLAGS)
-$(ASTPJ_LIB).$(ASTPJ_SO_VERSION): LIBS+=$(PJPROJECT_LDLIBS) -lssl -lcrypto -luuid -lm -lrt -lpthread
+$(ASTPJ_LIB).$(ASTPJ_SO_VERSION): LIBS+=$(PJPROJECT_LDLIBS) -lssl -lcrypto -luuid -lm -lpthread
 ifeq ($(GNU_LD),1)
     $(ASTPJ_LIB).$(ASTPJ_SO_VERSION): SO_SUPPRESS_SYMBOLS=-Wl,--version-script,libasteriskpj.exports,--warn-common
 endif
index 6dc0d3abe6169a2b7bf8c9692f21fd59b1f0520a..75bace26bbfd63866cefe76417be46a854189020 100644 (file)
@@ -1367,7 +1367,7 @@ static int ast_rtp_dtls_set_configuration(struct ast_rtp_instance *instance, con
                return 0;
        }
 
-#if OPENSSL_VERSION_NUMBER < 0x10002000L
+#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
        rtp->ssl_ctx = SSL_CTX_new(DTLSv1_method());
 #else
        rtp->ssl_ctx = SSL_CTX_new(DTLS_method());
index 106938b6cc9ea48a8a6f2e8269fe1fec8bff2526..5a4c2d1b6a2cfb61b9ec85e3c10eb95317e4ef41 100644 (file)
@@ -193,9 +193,9 @@ clean:
        $(ECHO_PREFIX) Cleaning
        +-$(CMD_PREFIX) test -d source && ($(SUBMAKE) -C source clean || : ;\
                rm -rf source/pjsip-apps/bin/* || : ;\
-               find source -name *.a -delete ;\
-               find source -name *.o -delete ;\
-               find source -name *.so -delete ; ) || :
+               find source -name *.a | xargs rm -rf  ;\
+               find source -name *.o | xargs rm -rf  ;\
+               find source -name *.so  | xargs rm -rf ; ) || :
        -$(CMD_PREFIX) rm -rf pjproject.symbols
 
 distclean: