pkgsrc/security/zoneminder/patches/patch-src_zm__timer.h
gdt 06f6278398 security/zoneminder: Update to 1.29.0
This is the last version that supports autoconf, and this update is
only because it's a reasonable benefit/cost tradeoff as an
intermediaate step.  Tested on netbsd-9/earmv7hf-el.

Upstream chanages:
  many bug fixes and improvements
  zoneminder API
  Multiserver
  limted ONVIF support

See more at
https://github.com/ZoneMinder/zoneminder/releases/tag/v1.29.0-rc2 and
before and after.

Note that when updating, one must run zmupdate to modify the db schema.
2020-08-25 16:42:21 +00:00

28 lines
936 B
C++

$NetBSD: patch-src_zm__timer.h,v 1.4 2020/08/25 16:42:21 gdt 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 2016-02-03 18:40:30.000000000 +0000
+++ src/zm_timer.h
@@ -33,7 +33,7 @@ private:
class TimerException : public Exception
{
private:
-#ifndef SOLARIS
+#if !defined(SOLARIS) && !defined(__NetBSD__)
pid_t pid() {
pid_t tid;
#ifdef __FreeBSD__
@@ -53,7 +53,7 @@ private:
pthread_t pid() { return( pthread_self() ); }
#endif
public:
- TimerException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)pid() ) )
+ TimerException( const std::string &message ) : Exception( stringtf( ("(%d) "+message).c_str(), (intmax_t)pid() ) )
{
}
};