[vlc-devel] [PATCH] vlc_fixups: add missing struct timespec
Steve Lhomme
robux4 at gmail.com
Tue Jan 26 16:21:10 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 f95cecf..1a26bf1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -613,6 +613,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 8adb641..0099dbf 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -373,6 +373,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.6.1.windows.1
More information about the vlc-devel
mailing list