From ac3abcbb8e780df94460ebb46e8daa34515c214f Mon Sep 17 00:00:00 2001 From: arichardson Date: Mon, 23 Mar 2020 17:51:44 +0000 Subject: [PATCH] Fix newvers.sh on macOS 10.15 It appears that the macOS /bin/sh echo now defaults to -e and therefore the `#define VERSTR` included newline characters instead of \n. This caused compiler errors due to unterminated strings. Fix by using printf instead of echo. A less fragile solution might be to bootstrap the in-tree /bin/sh but that requires more changes. Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D24136 --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 5629fede41e3..ac07bb077e1a 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -343,7 +343,7 @@ EOF ) vers_content_old=$(cat vers.c 2>/dev/null || true) if [ "$vers_content_new" != "$vers_content_old" ]; then - echo "$vers_content_new" > vers.c + printf "%s" "$vers_content_new" > vers.c fi echo $((v + 1)) > version