Discussion:
[libdvdcss-devel] [PATCH] win32: Fix broken mkdir() invocations that need to be mapped to _mkdir()
Diego Biurrun
2013-01-31 20:51:10 UTC
Permalink
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" );
--
1.7.9.5
Jean-Baptiste Kempf
2013-02-01 12:38:02 UTC
Permalink
Yes.
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
Jean-Baptiste Kempf
2013-02-11 00:27:44 UTC
Permalink
Yes.
Applied.

Best regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
Loading...