[vlc-devel] [PATCH] Fix Hurd build
Samuel Thibault
samuel.thibault at ens-lyon.org
Tue Apr 26 02:58:54 CEST 2016
* The hurd also uses the .so extension for libraries.
* theme_loader.cpp contains an unconditional use of PATH_MAX, which is
not defined on GNU/Hurd to avoid imposing build-time limits. This change
replaces its use with the same code used in src/posix/filesystem.c for
instance.
---
extras/analyser/zsh_completion.sh | 2 +-
modules/gui/skins2/src/theme_loader.cpp | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/extras/analyser/zsh_completion.sh b/extras/analyser/zsh_completion.sh
index a380a90..156b4d9 100755
--- a/extras/analyser/zsh_completion.sh
+++ b/extras/analyser/zsh_completion.sh
@@ -11,7 +11,7 @@ case $HOST in
*cygwin*|*mingw*)
SUFFIX=dll
;;
- *linux*|*bsd*)
+ *linux*|*bsd*|*gnu*)
SUFFIX=so
;;
*)
diff --git a/modules/gui/skins2/src/theme_loader.cpp b/modules/gui/skins2/src/theme_loader.cpp
index 1ec1dfc..64bd679 100644
--- a/modules/gui/skins2/src/theme_loader.cpp
+++ b/modules/gui/skins2/src/theme_loader.cpp
@@ -549,7 +549,10 @@ int tar_extract_all( TAR *t, char *prefix )
union tar_buffer buffer;
int len, err, getheader = 1, remaining = 0;
FILE *outfile = NULL;
- char fname[BLOCKSIZE + PATH_MAX];
+
+ long path_max = pathconf (".", _PC_PATH_MAX);
+ size_t maxsize = (path_max == -1 || path_max > 4096) ? 4096 : path_max;
+ char fname[BLOCKSIZE + maxsize];
while( 1 )
{
--
2.6.4
More information about the vlc-devel
mailing list