[SCM] mplayer/master: Add a patch to fix a FTBFS in GNU/Hurd.
micove-guest at users.alioth.debian.org
micove-guest at users.alioth.debian.org
Wed Sep 16 05:17:04 UTC 2015
The following commit has been merged in the master branch:
commit f375301c4a3a65d1f5ebb1e8f9296b9c362950c3
Author: Miguel A. Colón Vélez <debian.micove at gmail.com>
Date: Tue Sep 15 23:54:25 2015 -0400
Add a patch to fix a FTBFS in GNU/Hurd.
It's kind of an ugly patch.
diff --git a/debian/patches/0101_PATH_MAX_HURD.patch b/debian/patches/0101_PATH_MAX_HURD.patch
new file mode 100644
index 0000000..88af0da
--- /dev/null
+++ b/debian/patches/0101_PATH_MAX_HURD.patch
@@ -0,0 +1,82 @@
+Description: Fix FTBFS in GNU/Hurd.
+ - PATH_MAX does not have to be defined and is not define in GNU/Hurd.
+ - O_NDELAY is deprecated and not defined in Hurd unless _BSD_SOURCE is defined.
+ .
+ Hardcoding PATH_MAX is ugly but if it's not defined then "anything" is a valid
+ limit as long as it does not break malloc. It would be better if it used
+ dynamically allocated memory instead of 4096 but someone can provide an
+ improved patch for that.
+Author: Miguel A. Colón Vélez <debian.micove at gmail.com>
+Forwarded: yes
+Last-Update: 2015-09-15
+
+--- a/gui/dialog/fileselect.c
++++ b/gui/dialog/fileselect.c
+@@ -52,6 +52,12 @@
+ char *get_current_dir_name(void);
+ #else
+ #include <limits.h>
++
++// FIXME: Some systems don't define PATH_MAX (Example: GNU/Hurd)
++#ifndef PATH_MAX
++# define PATH_MAX 4096
++#endif
++
+ #define get_current_dir_name() getcwd(NULL, PATH_MAX)
+ #endif
+
+--- a/libao2/ao_esd.c
++++ b/libao2/ao_esd.c
+@@ -32,6 +32,10 @@
+ * most likely a linux sound card driver problem)
+ */
+
++#ifdef __GNU__
++#define _BSD_SOURCE
++#endif
++
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/socket.h>
+--- a/libmpcodecs/vf_screenshot.c
++++ b/libmpcodecs/vf_screenshot.c
+@@ -38,6 +38,11 @@
+ #include "libswscale/swscale.h"
+ #include "libavcodec/avcodec.h"
+
++// FIXME: Some systems don't define PATH_MAX (Example: GNU/Hurd)
++#ifndef PATH_MAX
++# define PATH_MAX 4096
++#endif
++
+ struct vf_priv_s {
+ int frameno;
+ char fname[PATH_MAX];
+--- a/mplayer.c
++++ b/mplayer.c
+@@ -335,6 +335,11 @@
+ /* This header requires all the global variable declarations. */
+ #include "cfg-mplayer.h"
+
++// FIXME: Some systems don't define PATH_MAX (Example: GNU/Hurd)
++#ifndef PATH_MAX
++# define PATH_MAX 4096
++#endif
++
+ const void *mpctx_get_video_out(MPContext *mpctx)
+ {
+ return mpctx->video_out;
+--- a/osdep/osdep.h
++++ b/osdep/osdep.h
+@@ -34,6 +34,11 @@
+ #include <limits.h> /* PATH_MAX */
+ #include <errno.h> /* errno */
+
++// FIXME: Some systems don't define PATH_MAX (Example: GNU/Hurd)
++#ifndef PATH_MAX
++# define PATH_MAX 4096
++#endif
++
+ #define fopen(n, m) \
+ (strlen(n) >= PATH_MAX ? (errno = ENAMETOOLONG, NULL) : (fopen)(n, m))
+
diff --git a/debian/patches/series b/debian/patches/series
index d3b0e92..a57a1ca 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
0002_mplayer_debug_printf.patch
0100_Fix_FTBFS_kfreebsd.patch
50_Hurd_PATH_MAX.patch
+0101_PATH_MAX_HURD.patch
--
mplayer packaging
More information about the pkg-multimedia-commits
mailing list