Commit df0f6c17 authored by Rafaël Carré's avatar Rafaël Carré

Fix dvdnav building for win32 (backported from master)

parent 05b6ecca
...@@ -1069,7 +1069,7 @@ libdvdnav: libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2 ...@@ -1069,7 +1069,7 @@ libdvdnav: libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2
.dvdnav: libdvdnav .dvdcss .dvdnav: libdvdnav .dvdcss
ifdef HAVE_WIN32 ifdef HAVE_WIN32
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -Dssize_t=long" && make && make install) (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" && make && make install)
else else
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) CFLAGS="$(CFLAGS) -Dlseek64=lseek -Doff64_t=off_t" && make && make install) (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) CFLAGS="$(CFLAGS) -Dlseek64=lseek -Doff64_t=off_t" && make && make install)
endif endif
......
...@@ -341,6 +341,18 @@ diff -ur libdvdnav/src/vm/vm.c libdvdnav.new/src/vm/vm.c ...@@ -341,6 +341,18 @@ diff -ur libdvdnav/src/vm/vm.c libdvdnav.new/src/vm/vm.c
fi fi
--- libdvdnav/configure.ac 2005-02-11 12:33:19.000000000 +0000 --- libdvdnav/configure.ac 2005-02-11 12:33:19.000000000 +0000
+++ libdvdnav.new/configure.ac 2005-12-02 15:23:13.921875000 +0000 +++ libdvdnav.new/configure.ac 2005-12-02 15:23:13.921875000 +0000
@@ -128,7 +128,10 @@
AC_TYPE_SIZE_T
dnl AC_CHECK_TYPES([ptrdiff_t])
AC_C_BIGENDIAN
-
+dnl ---------------------------------------------
+dnl Check for basic *nix fonction that we may emulate on other OS
+dnl ---------------------------------------------
+AC_CHECK_FUNCS(gettimeofday)
dnl ---------------------------------------------
dnl threads
dnl ---------------------------------------------
@@ -138,7 +138,7 @@ @@ -138,7 +138,7 @@
THREAD_CFLAGS="-I/usr/local/include -D_THREAD_SAFE" THREAD_CFLAGS="-I/usr/local/include -D_THREAD_SAFE"
CFLAGS="$THREAD_CFLAGS $CFLAGS" CFLAGS="$THREAD_CFLAGS $CFLAGS"
...@@ -461,3 +473,22 @@ diff -ur libdvdnav/src/vm/vm.c libdvdnav.new/src/vm/vm.c ...@@ -461,3 +473,22 @@ diff -ur libdvdnav/src/vm/vm.c libdvdnav.new/src/vm/vm.c
menus_LDADD = $(DVDNAV_LIB) menus_LDADD = $(DVDNAV_LIB)
$(DVDNAV_LIB): $(DVDNAV_LIB):
--- libdvdnav/src/dvdnav_internal.h.orig 2007-02-19 18:41:27.784456800 +0000
+++ libdvdnav/src/dvdnav_internal.h 2007-02-19 18:41:50.706478500 +0000
@@ -45,6 +45,7 @@
#define pthread_mutex_unlock(a) LeaveCriticalSection(a)
#define pthread_mutex_destroy(a)
+#ifndef HAVE_GETTIMEOFDAY
/* replacement gettimeofday implementation */
#include <sys/timeb.h>
static inline int _private_gettimeofday( struct timeval *tv, void *tz )
@@ -56,6 +57,8 @@
return 0;
}
#define gettimeofday(TV, TZ) _private_gettimeofday((TV), (TZ))
+#endif
+
#include <io.h> /* read() */
#define lseek64 _lseeki64
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment