[libdvdcss-devel] Win32: Fix broken mkdir() invocations that need to be mapped to _mkdir()

Diego Biurrun git at videolan.org
Mon Feb 11 13:59:41 CET 2013


libdvdcss | branch: master | Diego Biurrun <diego at biurrun.de> | Mon Feb 11 01:21:26 2013 +0100| [1fab727ead1c7f84300cae8d077a24c9c9aa83aa] | committer: Jean-Baptiste Kempf

Win32: Fix broken mkdir() invocations that need to be mapped to _mkdir()

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

> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=1fab727ead1c7f84300cae8d077a24c9c9aa83aa
---

 src/libdvdcss.c |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index 01eafef..4a09084 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -132,6 +132,10 @@
 #include "ioctl.h"
 #include "device.h"
 
+#if defined(WIN32)
+#define mkdir(a, b) _mkdir(a)
+#endif
+
 /**
  * \brief Symbol for version checks.
  *
@@ -521,11 +525,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
 
         /* We have a disc name or ID, we can create the cache dir */
         i = sprintf( dvdcss->psz_cachefile, "%s", psz_cache );
-#if !defined( WIN32 ) || defined( SYS_CYGWIN )
         i_ret = mkdir( dvdcss->psz_cachefile, 0755 );
-#else
-        i_ret = mkdir( dvdcss->psz_cachefile );
-#endif
         if( i_ret < 0 && errno != EEXIST )
         {
             print_error( dvdcss, "failed creating cache directory" );
@@ -535,11 +535,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
 
         i += sprintf( dvdcss->psz_cachefile + i, "/%s-%s%s", psz_title,
                       psz_serial, psz_key );
-#if !defined( WIN32 ) || defined( SYS_CYGWIN )
         i_ret = mkdir( dvdcss->psz_cachefile, 0755 );
-#else
-        i_ret = mkdir( dvdcss->psz_cachefile );
-#endif
         if( i_ret < 0 && errno != EEXIST )
         {
             print_error( dvdcss, "failed creating cache subdirectory" );



More information about the libdvdcss-devel mailing list