[BACK]Return to patch-src_zm_logger_cpp CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / security / zoneminder / patches

File: [cvs.NetBSD.org] / pkgsrc / security / zoneminder / patches / patch-src_zm_logger_cpp (download)

Revision 1.3, Mon Apr 29 21:31:13 2013 UTC (10 years, 9 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2
Changes since 1.2: +10 -2 lines

Add a number of includes hidden by libstdc++'s name space pollution.

$NetBSD: patch-src_zm_logger_cpp,v 1.3 2013/04/29 21:31:13 joerg Exp $

If the system has syscall() but not SYS_gettid [E.g. NetBSD], don't attempt
to use SYS_gettid.

--- src/zm_logger.cpp.orig	2011-06-28 11:07:35.000000000 +0000
+++ src/zm_logger.cpp
@@ -33,6 +33,7 @@
 #include <signal.h>
 #include <stdarg.h>
 #include <errno.h>
+#include <unistd.h>
 
 bool Logger::smInitialised = false;
 Logger *Logger::smInstance = 0;
@@ -515,7 +516,7 @@ void Logger::logPrint( bool hex, const c
     #endif
 
         pid_t tid;
-#ifdef HAVE_SYSCALL
+#if defined(HAVE_SYSCALL) && defined(SYS_gettid)
         if ( (tid = syscall(SYS_gettid)) < 0 ) // Thread/Process id
 #endif // HAVE_SYSCALL
         tid = getpid(); // Process id