[vlc-commits] vlc_fixups: add missing struct timespec

Steve Lhomme git at videolan.org
Tue Feb 9 00:30:12 CET 2016


vlc | branch: master | Steve Lhomme <slhomme at matroska.org> | Mon Feb  8 16:48:19 2016 +0100| [76ca1aaac4bafa16da133d0e37136a0bf18e9e9a] | committer: Jean-Baptiste Kempf

vlc_fixups: add missing struct timespec

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=76ca1aaac4bafa16da133d0e37136a0bf18e9e9a
---

 configure.ac         |    4 ++++
 include/vlc_fixups.h |    7 +++++++
 2 files changed, 11 insertions(+)

diff --git a/configure.ac b/configure.ac
index 3e9eb21..344d93e 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 <time.h>])
+
 dnl Checks for socket stuff
 VLC_SAVE_FLAGS
 SOCKET_LIBS=""
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 4bfed0f..ce60430 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -359,6 +359,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
 {



More information about the vlc-commits mailing list