diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index b55006f..08a5a41 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt @@ -1,2 +1,3 @@ +add_subdirectory(ocspcheck) add_subdirectory(openssl) add_subdirectory(nc) diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index d8e1ddb..41dc37b 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt @@ -714,6 +714,11 @@ if(NOT HAVE_STRNDUP) endif() endif() +if(NOT HAVE_STRSEP) + set(CRYPTO_SRC ${CRYPTO_SRC} compat/strsep.c) + set(EXTRA_EXPORT ${EXTRA_EXPORT} strsep) +endif() + if(NOT HAVE_TIMEGM) set(CRYPTO_SRC ${CRYPTO_SRC} compat/timegm.c) set(EXTRA_EXPORT ${EXTRA_EXPORT} timegm) diff --git a/crypto/Makefile.am b/crypto/Makefile.am index 1332c24..26def2a 100644 --- a/crypto/Makefile.am +++ b/crypto/Makefile.am @@ -73,6 +73,10 @@ libcompat_la_SOURCES += compat/strnlen.c endif endif +if !HAVE_STRSEP +libcompat_la_SOURCES += compat/strsep.c +endif + if !HAVE_ASPRINTF libcompat_la_SOURCES += compat/bsd-asprintf.c endif diff --git a/m4/check-libc.m4 b/m4/check-libc.m4 index 3c0ed31..73ff4e6 100644 --- a/m4/check-libc.m4 +++ b/m4/check-libc.m4 @@ -188,6 +188,9 @@ fi if test "x$ac_cv_func_strnlen" = "xno" ; then echo strnlen >> $crypto_p_sym fi +if test "x$ac_cv_func_strsep" = "xno" ; then + echo strsep >> $crypto_p_sym +fi if test "x$ac_cv_func_timegm" = "xno" ; then echo timegm >> $crypto_p_sym fi diff --git a/tls/CMakeLists.txt b/tls/CMakeLists.txt index dcefad7..b71fb37 100644 --- a/tls/CMakeLists.txt +++ b/tls/CMakeLists.txt @@ -19,10 +19,6 @@ set( ) -if(NOT HAVE_STRSEP) - set(TLS_SRC ${TLS_SRC} strsep.c) -endif() - if(NOT "${OPENSSLDIR}" STREQUAL "") add_definitions(-D_PATH_SSL_CA_FILE=\"${OPENSSLDIR}/cert.pem\") else() diff --git a/tls/Makefile.am b/tls/Makefile.am index b6fdd58..bd2707a 100644 --- a/tls/Makefile.am +++ b/tls/Makefile.am @@ -29,7 +29,3 @@ libtls_la_SOURCES += tls_peer.c libtls_la_SOURCES += tls_util.c libtls_la_SOURCES += tls_verify.c noinst_HEADERS = tls_internal.h - -if !HAVE_STRSEP -libtls_la_SOURCES += strsep.c -endif diff --git a/update.sh b/update.sh index 5295bf4..0c51b43 100755 --- a/update.sh +++ b/update.sh @@ -83,6 +83,7 @@ for i in crypto/compat libtls-standalone/compat; do $libc_src/string/strlcat.c \ $libc_src/string/strndup.c \ $libc_src/string/strnlen.c \ + $libc_src/string/strsep.c \ $libc_src/string/timingsafe_bcmp.c \ $libc_src/string/timingsafe_memcmp.c \ $libcrypto_src/arc4random/getentropy_*.c \ @@ -205,9 +206,6 @@ done # add the libtls symbol export list grep '^[[:alpha:]]' < $libtls_src/Symbols.list > tls/tls.sym -$CP_LIBC $libc_src/string/strsep.c tls -$CP_LIBC $libc_src/string/strsep.c libtls-standalone/compat - mkdir -p libtls-standalone/m4 $CP m4/check*.m4 \ m4/disable*.m4 \