2013-09-26 17:14:40 +02:00

68 lines
2.7 KiB
Plaintext

$NetBSD: patch-ad,v 1.3 2013/03/24 16:51:08 joerg Exp $
--- PlaylistBroadcaster.tproj/PlaylistBroadcaster.cpp.orig 2005-03-11 23:24:54.000000000 +0000
+++ PlaylistBroadcaster.tproj/PlaylistBroadcaster.cpp
@@ -43,7 +43,9 @@
*/
-
+#if __NetBSD__
+#include <sys/param.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
@@ -57,7 +59,7 @@
#if defined (__solaris__) || defined (__osf__) || defined (__sgi__) || defined (__hpux__)
#include "daemon.h"
#else
- #ifndef __FreeBSD__
+ #ifndef __FreeBSD__ || __NetBSD__ || defined(__DragonFly__)
#include <sys/sysctl.h>
#endif
#endif
@@ -2077,7 +2079,7 @@ static void RegisterEventHandlers()
struct sigaction act;
-#if defined(sun) || defined(i386) || defined(__MacOSX__) || defined(__powerpc__) || defined (__sgi_cc__) || defined(__osf__) || defined(__hpux__)
+#if defined(sun) || defined(i386) || defined(__MacOSX__) || defined(__powerpc__) || defined (__sgi_cc__) || defined(__osf__) || defined(__hpux__) || defined(__NetBSD__)
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
act.sa_handler = (void(*)(int))&SignalEventHandler;
@@ -2094,14 +2096,14 @@ struct sigaction act;
if ( ::signal(SIGTERM, SIG_IGN) != SIG_IGN)
{ // from kill...
if ( ::sigaction(SIGTERM, &act, NULL) != 0 )
- { qtss_printf( "- PlaylistBroadcaster: System error (%i).\n", (int)SIG_ERR );
+ { qtss_printf( "- PlaylistBroadcaster: System error (%i).\n", (int)(uintptr_t)SIG_ERR );
}
}
if ( ::signal(SIGINT, SIG_IGN) != SIG_IGN)
{ // ^C signal
if ( ::sigaction(SIGINT, &act, NULL) != 0 )
- { qtss_printf( "- PlaylistBroadcaster: System error (%i).\n", (int)SIG_ERR );
+ { qtss_printf( "- PlaylistBroadcaster: System error (%i).\n", (int)(uintptr_t)SIG_ERR );
}
}
@@ -2109,7 +2111,7 @@ struct sigaction act;
if ( ::signal(SIGPIPE, SIG_IGN) != SIG_IGN)
{ // broken pipe probably from a failed RTSP session (the server went down?)
if ( ::sigaction(SIGPIPE, &act, NULL) != 0 )
- { qtss_printf( "- PlaylistBroadcaster: System error (%i).\n", (int)SIG_ERR );
+ { qtss_printf( "- PlaylistBroadcaster: System error (%i).\n", (int)(uintptr_t)SIG_ERR );
}
}
@@ -2117,7 +2119,7 @@ struct sigaction act;
if ( ::signal(SIGHUP, SIG_IGN) != SIG_IGN)
{ // broken pipe probably from a failed RTSP session (the server went down?)
if ( ::sigaction(SIGHUP, &act, NULL) != 0)
- { qtss_printf( "- PlaylistBroadcaster: System error (%i).\n", (int)SIG_ERR );
+ { qtss_printf( "- PlaylistBroadcaster: System error (%i).\n", (int)(uintptr_t)SIG_ERR );
}
}