[vlc-devel] [PATCH] vlc_fixups: add missing struct timespec
Steve Lhomme
robux4 at videolabs.io
Mon Feb 8 16:48:19 CET 2016
From: Steve Lhomme <slhomme at matroska.org>
---
configure.ac | 4 ++++
include/vlc_fixups.h | 7 +++++++
2 files changed, 11 insertions(+)
diff --git a/configure.ac b/configure.ac
index 3e9eb21..188fb88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -623,6 +623,10 @@ AC_CHECK_TYPES([struct pollfd],,,
#endif
])
+dnl Check for struct timespec
+AC_CHECK_TYPES([struct timespec],,,
+[#include <timespec.h>])
+
dnl Checks for socket stuff
VLC_SAVE_FLAGS
SOCKET_LIBS=""
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 120e159..7ea5cce 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -366,6 +366,13 @@ struct if_nameindex
# define if_freenameindex(list) (void)0
#endif
+#ifndef HAVE_STRUCT_TIMESPEC
+struct timespec {
+ time_t tv_sec; /* Seconds */
+ long tv_nsec; /* Nanoseconds */
+};
+#endif
+
#ifdef _WIN32
struct iovec
{
--
2.7.0.windows.1
More information about the vlc-devel
mailing list