Description: Avoid unconditional usage of PATH_MAX and MAXPATHLEN.
Author: Pino Toscano <pino@debian.org>
Forwarded: https://sourceforge.net/p/mjpeg/patches/53/
Bug: https://sourceforge.net/p/mjpeg/patches/53/
Bug-Debian: https://sourceforge.net/p/mjpeg/patches/53/
Acked-by: Alessio Treglia <alessio@debian.org>
Last-Update: 2013-10-07
---
 lavtools/editlist.c |    3 +++
 lavtools/png2yuv.c  |    4 ++++
 mplex/main.cpp      |    4 ++++
 3 files changed, 11 insertions(+)

--- mjpegtools.orig/lavtools/editlist.c
+++ mjpegtools/lavtools/editlist.c
@@ -26,6 +26,9 @@
 #include "editlist.h"
 #include <math.h>
 
+#ifndef PATH_MAX
+# define PATH_MAX 4096
+#endif
 
 /* Since we use malloc often, here the error handling */
 
--- mjpegtools.orig/lavtools/png2yuv.c
+++ mjpegtools/lavtools/png2yuv.c
@@ -51,6 +51,10 @@ png2yuv
 #include "subsample.h"
 #include "colorspace.h"
 
+#ifndef PATH_MAX
+# define PATH_MAX 4096
+#endif
+
 #define DEFAULT_CHROMA_MODE Y4M_CHROMA_420JPEG
 
 typedef struct _parameters 
--- mjpegtools.orig/mplex/main.cpp
+++ mjpegtools/mplex/main.cpp
@@ -73,6 +73,10 @@ lround(double x)
 };
 #endif
 
+#if	!defined(MAXPATHLEN)
+# define MAXPATHLEN 4096
+#endif
+
 
 
 class FileOutputStream : public OutputStream
