[vlc-commits] contrib: asdcplib: Remove use of dirent_win.h
Hugo Beauzée-Luyssen
git at videolan.org
Tue Feb 14 17:29:57 CET 2017
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Feb 14 17:21:29 2017 +0100| [51e724f6e2abe714ec43f49f95d9c5e1187dc484] | committer: Hugo Beauzée-Luyssen
contrib: asdcplib: Remove use of dirent_win.h
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=51e724f6e2abe714ec43f49f95d9c5e1187dc484
---
contrib/src/asdcplib/rules.mak | 1 +
contrib/src/asdcplib/win32-dirent.patch | 51 +++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+)
diff --git a/contrib/src/asdcplib/rules.mak b/contrib/src/asdcplib/rules.mak
index 6f64ba3..0e35b68 100644
--- a/contrib/src/asdcplib/rules.mak
+++ b/contrib/src/asdcplib/rules.mak
@@ -20,6 +20,7 @@ asdcplib: asdcplib-$(ASDCPLIB_VERSION).tar.gz .sum-asdcplib
$(APPLY) $(SRC)/asdcplib/static-programs.patch
$(APPLY) $(SRC)/asdcplib/adding-pkg-config-file.patch
$(APPLY) $(SRC)/asdcplib/win32-cross-compilation.patch
+ $(APPLY) $(SRC)/asdcplib/win32-dirent.patch
$(MOVE)
.asdcplib: asdcplib
diff --git a/contrib/src/asdcplib/win32-dirent.patch b/contrib/src/asdcplib/win32-dirent.patch
new file mode 100644
index 0000000..b137426
--- /dev/null
+++ b/contrib/src/asdcplib/win32-dirent.patch
@@ -0,0 +1,51 @@
+--- asdcplib/src/KM_fileio.h.orig 2017-02-14 17:17:22.745776193 +0100
++++ asdcplib/src/KM_fileio.h 2017-02-14 17:17:29.713782420 +0100
+@@ -37,7 +37,6 @@
+
+ #ifdef KM_WIN32
+ # include <io.h>
+-# include "dirent_win.h"
+ #else
+ # include <dirent.h>
+ # include <unistd.h>
+@@ -46,6 +45,7 @@
+ #include <regex.h>
+ #endif
+
++#include <dirent.h>
+ #include <sys/stat.h>
+
+
+--- asdcplib/src/KM_fileio.cpp.orig 2017-02-14 17:16:18.297717750 +0100
++++ asdcplib/src/KM_fileio.cpp 2017-02-14 17:17:48.833799420 +0100
+@@ -1478,7 +1478,7 @@
+ if ( m_Handle == 0 )
+ return RESULT_FILEOPEN;
+
+-#if defined(__sun) && defined(__SVR4)
++#if (defined(__sun) && defined(__SVR4)) || defined(_WIN32)
+ struct stat s;
+ #endif
+ struct dirent* entry;
+@@ -1493,7 +1493,7 @@
+
+ next_item_name.assign(entry->d_name, strlen(entry->d_name));
+
+-#if defined(__sun) && defined(__SVR4)
++#if (defined(__sun) && defined(__SVR4)) || defined(_WIN32)
+
+ stat(entry->d_name, &s);
+
+@@ -1506,10 +1506,11 @@
+ case S_IFREG:
+ next_item_type = DET_FILE;
+ break;
+-
++#ifndef _WIN32
+ case S_IFLNK:
+ next_item_type = DET_LINK;
+ break;
++#endif
+
+ default:
+ next_item_type = DET_DEV;
More information about the vlc-commits
mailing list