summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-03-19 16:20:25 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-03-19 16:20:25 +0100
commitaef0be0c1799fbb20955fc1dc014cb9c9772af88 (patch)
treeb4fd12d22ab4c60984460209df34e1169b5e961b
parent0dab9aa0c4f50403436f318e92a65903a956c195 (diff)
downloadrsyslog-aef0be0c1799fbb20955fc1dc014cb9c9772af88.tar.gz
rsyslog-aef0be0c1799fbb20955fc1dc014cb9c9772af88.tar.bz2
rsyslog-aef0be0c1799fbb20955fc1dc014cb9c9772af88.zip
bugfix: solve compile problems on non-Linux platforms
Thanks to Michael Biebl for alerting us on this issue.
-rw-r--r--configure.ac1
-rw-r--r--runtime/debug.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 7a4af19d..68769808 100644
--- a/configure.ac
+++ b/configure.ac
@@ -122,6 +122,7 @@ AC_CHECK_DECL([SCM_CREDENTIALS], [AC_DEFINE(HAVE_SCM_CREDENTIALS, [1], [set defi
#include <sys/socket.h>])
AC_CHECK_DECL([SO_TIMESTAMP], [AC_DEFINE(HAVE_SO_TIMESTAMP, [1], [set define])], [], [#include <sys/types.h>
#include <sys/socket.h>])
+AC_CHECK_DECL([SYS_gettid], [AC_DEFINE(HAVE_SYS_gettid, [1], [set define])], [], [#include <sys/syscall.h>])
AC_CHECK_MEMBER([struct sysinfo.uptime], [AC_DEFINE(HAVE_SYSINFO_UPTIME, [1], [set define])], [], [#include <sys/sysinfo.h>])
# Check for MAXHOSTNAMELEN
diff --git a/runtime/debug.c b/runtime/debug.c
index 3cb22232..876f61d0 100644
--- a/runtime/debug.c
+++ b/runtime/debug.c
@@ -303,7 +303,7 @@ static inline void dbgFuncDBRemoveMutexLock(dbgFuncDB_t *pFuncDB, pthread_mutex_
void
dbgOutputTID(char* name)
{
-# ifdef HAVE_SYSCALL
+# if defined(HAVE_SYSCALL) && defined(HAVE_SYS_gettid)
if(bOutputTidToStderr)
fprintf(stderr, "thread tid %u, name '%s'\n",
(unsigned)syscall(SYS_gettid), name);