diff options
author | lns <matzeton@googlemail.com> | 2022-06-06 00:41:41 +0200 |
---|---|---|
committer | lns <matzeton@googlemail.com> | 2022-06-06 00:41:41 +0200 |
commit | d846baea5c013c1576735f656fa80de5b7bd6d71 (patch) | |
tree | 8134a5964b89dda2dbc3564f48dd638ecdea4909 | |
parent | 0b3f8ed849cdf9971224c49a3958f0904a2bbbb5 (diff) |
Prevent compilation failure if, for whatever reason, NDPI_API_VERSION is empty.improved/empty-api-version
- This is not a fix for #1494, just an improvment.
Signed-off-by: lns <matzeton@googlemail.com>
-rw-r--r-- | configure.ac | 6 |
1 files changed, 5 insertions, 1 deletions
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]) |