aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2022-05-16 13:02:34 +0200
committerIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2022-05-16 16:54:18 +0200
commitdae7986a37459c2d2da65a72b0446f93756b191b (patch)
tree466f54b098ff6b4cc69ff8b5ae676b8cbd8ed73b /configure.ac
parent3c08a3c87571e7ec0b8611f41853a0556eb11323 (diff)
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>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 2 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index c892e0cbf..8023a84a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])