From bc7792fd7c6ef45c3ede3f31a594e09c6b70a2a1 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 19 Jul 2003 21:41:53 +0000 Subject: [PATCH] MinGW support in mpdvdkit patch by Sascha Sommer git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10444 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 4 ++-- libmpdvdkit2/dvd_reader.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 6dcbe9bb37..d5be253ef4 100755 --- a/configure +++ b/configure @@ -3779,13 +3779,13 @@ fi echocheck "DVD support (libmpdvdkit)" if test "$_dvdkit" = auto ; then _dvdkit=no - if linux || freebsd || netbsd || darwin || cygwin || openbsd || sunos || hpux; then + if linux || freebsd || netbsd || darwin || cygwin || mingw32 || openbsd || sunos || hpux; then test -f "./libmpdvdkit2/Makefile" && _dvdkit=yes test -f "./libmpdvdkit/Makefile" && _dvdkit=yes fi fi if test "$_dvdkit" = yes ; then - if test "$_dvd" = yes || test "$_cdrom" = yes || test "$_cdio" = yes || test "$_dvdio" = yes || test "$_bsdi_dvd" = yes || test "$_hpux_scsi_h" = yes || darwin || cygwin ; then + if test "$_dvd" = yes || test "$_cdrom" = yes || test "$_cdio" = yes || test "$_dvdio" = yes || test "$_bsdi_dvd" = yes || test "$_hpux_scsi_h" = yes || darwin || cygwin || mingw32 ; then if test -f "./libmpdvdkit2/Makefile" ; then _inputmodules="mpdvdkit2 $_inputmodules" _dvdread=libmpdvdkit2 diff --git a/libmpdvdkit2/dvd_reader.c b/libmpdvdkit2/dvd_reader.c index 484762b58f..60469b2255 100644 --- a/libmpdvdkit2/dvd_reader.c +++ b/libmpdvdkit2/dvd_reader.c @@ -310,7 +310,9 @@ dvd_reader_t *DVDOpen( const char *path ) if( cdir >= 0 ) { chdir( path_copy ); new_path = getcwd( NULL, PATH_MAX ); +#ifndef __MINGW32__ fchdir( cdir ); +#endif close( cdir ); if( new_path ) { free( path_copy );