From d846baea5c013c1576735f656fa80de5b7bd6d71 Mon Sep 17 00:00:00 2001 From: lns Date: Mon, 6 Jun 2022 00:41:41 +0200 Subject: Prevent compilation failure if, for whatever reason, NDPI_API_VERSION is empty. - This is not a fix for #1494, just an improvment. Signed-off-by: lns --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2afd98181..f17538883 100644 --- a/configure.ac +++ b/configure.ac @@ -90,7 +90,11 @@ else NDPI_API_VERSION=$((SOURCE_DATE_EPOCH % 65536)) fi -echo "Setting API version to $NDPI_API_VERSION" +AS_IF([test "x${NDPI_API_VERSION}" = "x"],[ + AC_MSG_WARN([Could not get NDPI_API_VERSION, defaulting to 0.]) + NDPI_API_VERSION=0 +]) +echo "Setting API version to ${NDPI_API_VERSION}" AC_DEFINE_UNQUOTED(NDPI_GIT_RELEASE, "${GIT_RELEASE}", [GIT Release]) AC_DEFINE_UNQUOTED(NDPI_GIT_DATE, "${GIT_DATE}", [Last GIT change]) -- cgit v1.2.3