Diego Biurrun
2013-01-31 20:51:10 UTC
Signed-off-by: Diego Biurrun <***@biurrun.de>
---
src/libdvdcss.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index 37171c2..0b2c20f 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -128,6 +128,10 @@
#include "ioctl.h"
#include "device.h"
+#if defined(WIN32)
+#define mkdir(a, b) _mkdir(a)
+#endif
+
/**
* \brief Symbol for version checks.
*
@@ -518,11 +522,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" );
@@ -532,11 +532,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" );
---
src/libdvdcss.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index 37171c2..0b2c20f 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -128,6 +128,10 @@
#include "ioctl.h"
#include "device.h"
+#if defined(WIN32)
+#define mkdir(a, b) _mkdir(a)
+#endif
+
/**
* \brief Symbol for version checks.
*
@@ -518,11 +522,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" );
@@ -532,11 +532,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" );
--
1.7.9.5
1.7.9.5