aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2011-12-16 16:21:01 +0100
committerTobias Brunner <tobias@strongswan.org>2011-12-16 16:44:38 +0100
commitc17f6f96e2da0265a5d565a43cbca036f1571dfb (patch)
tree1719b4ec23b9f10ae5dbaa6e6628997ea379d965 /configure.in
parentb24287c2693e681c33a6a3f11455cbf604f218b0 (diff)
downloadstrongswan-c17f6f96e2da0265a5d565a43cbca036f1571dfb.tar.bz2
strongswan-c17f6f96e2da0265a5d565a43cbca036f1571dfb.tar.xz
Log native thread ID when a thread is created.
If possible gettid() is used, otherwise pthread_self() is logged (which is not completely portable, but seems to work on most supported platforms).
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 4f4f03554..b6c35703a 100644
--- a/configure.in
+++ b/configure.in
@@ -380,6 +380,17 @@ dnl check if native rwlocks are available
AC_CHECK_FUNCS(pthread_rwlock_init)
LIBS=$saved_LIBS
+AC_MSG_CHECKING([for gettid])
+AC_TRY_COMPILE(
+ [#define _GNU_SOURCE
+ #include <unistd.h>
+ #include <sys/syscall.h>],
+ [int main() {
+ return syscall(SYS_gettid);}],
+ [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GETTID])],
+ [AC_MSG_RESULT([no])]
+)
+
AC_CHECK_FUNCS(prctl mallinfo getpass closefrom)
AC_CHECK_HEADERS(sys/sockio.h glob.h)