ref: 1fab727ead1c7f84300cae8d077a24c9c9aa83aa
parent: c19c82dff9232cf8aa60dc0ff267e5e24dadbd90
author: Diego Biurrun <diego@biurrun.de>
date: Sun Feb 10 20:21:26 EST 2013
Win32: Fix broken mkdir() invocations that need to be mapped to _mkdir() Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
--- 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 @@
/* 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 @@
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" );