]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
freebsd: Fixup header files for socket definitions. Make thread owner conditional...
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Fri, 30 Nov 2018 10:12:08 +0000 (10:12 +0000)
committerJaroslav Kysela <perex@perex.cz>
Thu, 6 Dec 2018 15:03:10 +0000 (16:03 +0100)
src/tcp.c
src/tvh_thread.c
src/wrappers.c

index a79a886a7421e628a7d31c8f8dc6e5fd05381746..cf500eb2d46a38116576256020c70074280c0322 100644 (file)
--- a/src/tcp.c
+++ b/src/tcp.c
 #include <fcntl.h>
 #include <poll.h>
 #include <signal.h>
+#include <sys/types.h>
 #include <netinet/in.h>
 #include <netinet/ip.h>
 #include <netinet/tcp.h>
 #include <arpa/inet.h>
-#include <sys/types.h>
 #include <sys/socket.h>
 #include <ifaddrs.h>
 #include <netdb.h>
index 6fc5c06159fd126e60595833d64eb0945585e902..1e961f9e7d05239c12dd6aaf012b6af0a151bff5 100644 (file)
@@ -390,7 +390,7 @@ static void tvh_thread_mutex_deadlock(tvh_mutex_t *mutex)
 {
   int fd = hts_settings_open_file(HTS_SETTINGS_OPEN_WRITE | HTS_SETTINGS_OPEN_DIRECT, "mutex-deadlock.txt");
   if (fd < 0) fd = fileno(stderr);
-#if __GLIBC__
+#if defined(PLATFORM_LINUX) && __GLIBC__
   int sid = mutex->mutex.__data.__owner; /* unportable */
 #else
   int sid = -1;
index 60554dc5f1f6f599b0ea034d05cbe8dfa7b256fa..4cccdfc41c5955e32b55d566b0afe5c3df54a66d 100644 (file)
@@ -1,5 +1,7 @@
 #define _GNU_SOURCE
 #include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/socket.h>
 #include <fcntl.h>
 #include "tvheadend.h"
 #include "tvhregex.h"