Yet another approach to fix #1499 (basically a copy&pasta from @socketpair).

* Related to #1545, #1494 and #1189 as well

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
Toni Uhlig
2022-05-16 16:54:18 +02:00
committed by Ivan Nardi
parent 3c08a3c875
commit dae7986a37
+2 -4
View File
@@ -67,7 +67,7 @@ AC_DEFINE_UNQUOTED(NDPI_PATCH_LEVEL, "${NDPI_PATCH}", [nDPI patch level])
# .git as directory in a cloned repo
# .git as file in submodule based integration
if test -d ".git" || test -f ".git" -a -d `cat .git | cut -d' ' -f2`; then :
if test -d ".git" || test -r ".git"; then
GIT_TAG=`git log -1 --format=%h`
GIT_DATE=`git log -1 --format=%cd`
#
@@ -87,11 +87,9 @@ else
if test -z "$SOURCE_DATE_EPOCH" ; then :
SOURCE_DATE_EPOCH=`date +%s`
fi
NDPI_API_VERSION=`echo $SOURCE_DATE_EPOCH | cut -c7-10`
NDPI_API_VERSION=$((SOURCE_DATE_EPOCH % 65536))
fi
NDPI_API_VERSION=`echo $NDPI_API_VERSION | sed 's/^0*//'`
echo "Setting API version to $NDPI_API_VERSION"
AC_DEFINE_UNQUOTED(NDPI_GIT_RELEASE, "${GIT_RELEASE}", [GIT Release])