vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Thu Mar 31 10:30:09 2016 +0200| [4a8c90274d7b36f8a920eb8a6e9cd0bb6b67a6da] | committer: Hugo Beauzée-Luyssen
contrib: live555: Don't reimplement gettimeofday when using mingw. It already has its implementation. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4a8c90274d7b36f8a920eb8a6e9cd0bb6b67a6da --- contrib/src/live555/no-gettimeofday.patch | 54 +++++++++++++++++++++++++++++ contrib/src/live555/rules.mak | 1 + 2 files changed, 55 insertions(+) diff --git a/contrib/src/live555/no-gettimeofday.patch b/contrib/src/live555/no-gettimeofday.patch new file mode 100644 index 0000000..e614d06 --- /dev/null +++ b/contrib/src/live555/no-gettimeofday.patch @@ -0,0 +1,54 @@ +--- live555/groupsock/GroupsockHelper.cpp.orig 2016-03-30 21:07:02.538195751 +0200 ++++ live555/groupsock/GroupsockHelper.cpp 2016-03-30 21:07:23.286235570 +0200 +@@ -755,7 +755,7 @@ + return (char const*)&timeString; + } + +-#if defined(__WIN32__) || defined(_WIN32) ++#if (defined(__WIN32__) || defined(_WIN32)) && !defined(__MINGW32__) + // For Windoze, we need to implement our own gettimeofday() + + // used to make sure that static variables in gettimeofday() aren't initialized simultaneously by multiple threads +--- live555/groupsock/include/GroupsockHelper.hh.orig 2016-03-31 10:11:32.734142022 +0200 ++++ live555/groupsock/include/GroupsockHelper.hh 2016-03-31 10:11:51.614092708 +0200 +@@ -130,7 +130,7 @@ + void reclaimGroupsockPriv(UsageEnvironment& env); + + +-#if defined(__WIN32__) || defined(_WIN32) ++#if (defined(__WIN32__) || defined(_WIN32)) && !defined(__MINGW32__) + // For Windoze, we need to implement our own gettimeofday() + extern int gettimeofday(struct timeval*, int*); + #endif +--- live555/groupsock/GroupsockHelper.cpp.orig 2016-03-31 10:16:23.765299784 +0200 ++++ live555/groupsock/GroupsockHelper.cpp 2016-03-31 10:17:00.701127166 +0200 +@@ -20,7 +20,7 @@ + + #include "GroupsockHelper.hh" + +-#if defined(__WIN32__) || defined(_WIN32) ++#if (defined(__WIN32__) || defined(_WIN32)) && !defined(__MINGW32__) + #include <time.h> + extern "C" int initializeWinsockIfNecessary(); + #else +--- live555/groupsock/GroupsockHelper.cpp.orig 2016-03-31 10:17:46.284928287 +0200 ++++ live555/groupsock/GroupsockHelper.cpp 2016-03-31 10:20:20.428341877 +0200 +@@ -27,6 +27,7 @@ + #include <stdarg.h> + #include <time.h> + #include <fcntl.h> ++#include <sys/time.h> + #define initializeWinsockIfNecessary() 1 + #endif + #if defined(__WIN32__) || defined(_WIN32) || defined(_QNX4) +--- live555/groupsock/include/GroupsockHelper.hh.orig 2016-03-31 10:22:56.667834195 +0200 ++++ live555/groupsock/include/GroupsockHelper.hh 2016-03-31 10:23:37.411710728 +0200 +@@ -133,6 +133,8 @@ + #if (defined(__WIN32__) || defined(_WIN32)) && !defined(__MINGW32__) + // For Windoze, we need to implement our own gettimeofday() + extern int gettimeofday(struct timeval*, int*); ++#else ++#include <sys/time.h> + #endif + + // The following are implemented in inet.c: diff --git a/contrib/src/live555/rules.mak b/contrib/src/live555/rules.mak index 6b14de3..21d7286 100644 --- a/contrib/src/live555/rules.mak +++ b/contrib/src/live555/rules.mak @@ -54,6 +54,7 @@ ifdef HAVE_ANDROID cd live && sed -e 's%-DPIC%-DPIC -DNO_SSTREAM=1 -DLOCALE_NOT_USED -I$(ANDROID_NDK)/platforms/$(ANDROID_API)/arch-$(PLATFORM_SHORT_ARCH)/usr/include%' -i.orig config.linux endif cd live && patch -lfp1 < ../../src/live555/winstore.patch + cd live && patch -lfp1 < ../../src/live555/no-gettimeofday.patch mv live $@ touch $@ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
