use thread ID instead of process ID in logger messages (issue #5349)
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 5 Oct 2005 00:21:56 +0000 (00:21 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 5 Oct 2005 00:21:56 +0000 (00:21 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6726 65c4cc65-6c06-0410-ace0-fbb531ad65f3

logger.c

index 4e476b2..987d52b 100755 (executable)
--- a/logger.c
+++ b/logger.c
@@ -65,13 +65,17 @@ static int syslog_level_map[] = {
 
 #define MAX_MSG_QUEUE 200
 
-#if defined(__linux__) && defined(__NR_gettid)
+#if defined(__linux__) && !defined(__NR_gettid)
 #include <asm/unistd.h>
+#endif
+
+#if defined(__linux__) && defined(__NR_gettid)
 #define GETTID() syscall(__NR_gettid)
 #else
 #define GETTID() getpid()
 #endif
 
+
 static char dateformat[256] = "%b %e %T";              /* Original Asterisk Format */
 
 AST_MUTEX_DEFINE_STATIC(msglist_lock);