From 672689d02c03ad9be49c0c78b3d855547f0fcc75 Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Wed, 27 Dec 2023 00:25:32 +0100 Subject: [PATCH] Avoid empty translation unit --- update.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/update.sh b/update.sh index 1f2d78b529..13eea7e34d 100755 --- a/update.sh +++ b/update.sh @@ -153,11 +153,12 @@ fi awk '/LIBRESSL_VERSION_TEXT/ {print $4}' < include/openssl/opensslv.h | cut -d\" -f1 > VERSION echo "LibreSSL version `cat VERSION`" +TOUCH_EMPTY='echo "/* empty */" >' # copy libcrypto source echo copying libcrypto source rm -f crypto/*.c crypto/*.h -touch crypto/empty.c +$TOUCH_EMPTY crypto/empty.c for i in `awk '/SOURCES|HEADERS/ { print $3 }' crypto/Makefile.am` ; do dir=`dirname $i` mkdir -p crypto/$dir @@ -311,7 +312,7 @@ done # copy libtls source echo copying libtls source rm -f tls/*.c tls/*.h libtls/src/*.c libtls/src/*.h -touch tls/empty.c +$TOUCH_EMPTY tls/empty.c for i in `awk '/SOURCES|HEADERS/ { print $3 }' tls/Makefile.am` ; do if [ -e $libtls_src/$i ]; then $CP $libtls_src/$i tls @@ -357,7 +358,7 @@ done # copy libssl source echo "copying libssl source" rm -f ssl/*.c ssl/*.h -touch ssl/empty.c +$TOUCH_EMPTY ssl/empty.c for i in `awk '/SOURCES|HEADERS/ { print $3 }' ssl/Makefile.am` ; do dir=`dirname $i` mkdir -p ssl/$dir @@ -368,7 +369,7 @@ $GREP '^[A-Za-z0-9_]' < $libssl_src/Symbols.list > ssl/ssl.sym # copy libcrypto tests echo "copying tests" -touch tests/empty.c +$TOUCH_EMPTY tests/empty.c for i in `find $libcrypto_regress -name '*.c'`; do $CP "$i" tests done