[vlc-commits] skins: fix WIN32 build
Thomas Guillem
git at videolan.org
Thu May 26 10:46:16 CEST 2016
vlc/vlc-2.2 | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue May 3 09:32:08 2016 +0200| [b6f63d60f13258576a14d3b5865208bd408ba566] | committer: Jean-Baptiste Kempf
skins: fix WIN32 build
Maybe we should add a vlc_get_pathmax.
(cherry picked from commit 9635f7466e550ae7a694e69ee82e5b03ca1438e0)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=b6f63d60f13258576a14d3b5865208bd408ba566
---
modules/gui/skins2/src/theme_loader.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/gui/skins2/src/theme_loader.cpp b/modules/gui/skins2/src/theme_loader.cpp
index 5100249..afb8e2c 100644
--- a/modules/gui/skins2/src/theme_loader.cpp
+++ b/modules/gui/skins2/src/theme_loader.cpp
@@ -549,7 +549,11 @@ int tar_extract_all( TAR *t, char *prefix )
union tar_buffer buffer;
int len, err, getheader = 1, remaining = 0;
FILE *outfile = NULL;
+#if defined( _WIN32 )
+ long path_max = PATH_MAX;
+#else
long path_max = pathconf (".", _PC_PATH_MAX);
+#endif
size_t maxsize = (path_max == -1 || path_max > 4096) ? 4096 : path_max;
char fname[BLOCKSIZE + maxsize];
More information about the vlc-commits
mailing list