pkgsrc/security/zoneminder/patches/patch-src_zm__timer.h
dsainty c01631c02e Patch up some Linux-specific assumptions in the code.
Fixes build under NetBSD.

Bump PKGREVISION for switch to ffmpeg2, and some portability changes that
aren't expected to affect functionality.
2015-04-10 02:58:49 +00:00

19 lines
762 B
C++

$NetBSD: patch-src_zm__timer.h,v 1.3 2015/04/10 02:58:49 dsainty Exp $
Fix build with Clang.
pthread_t is opaque, and under NetBSD is a pointer. It's being abused here,
but the value is only used for logging, and casting pthread_self() is more
portable than syscall(SYS_gettid).
--- src/zm_timer.h.orig 2008-07-25 09:33:24.000000000 +0000
+++ src/zm_timer.h
@@ -30,7 +30,7 @@ private:
class TimerException : public Exception
{
public:
- TimerException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(SYS_gettid) ) )
+ TimerException( const std::string &message ) : Exception( stringtf( ("(%lu) "+message).c_str(), (unsigned long)(uintptr_t)pthread_self() ) )
{
}
};