File: 02-do_not_use_PATH_MAX.patch

package info (click to toggle)
gphoto2 2.5.4-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,104 kB
  • ctags: 793
  • sloc: sh: 12,058; ansic: 6,467; makefile: 124; perl: 89; sed: 16
file content (28 lines) | stat: -rw-r--r-- 716 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Author: Cyril Roelandt
Bug-Debian: https://bugs.debian.org/671545
Description: Fix FTBFS on hurd-i386
 Fix hurd-i386 because of the unconditional use of PATH_MAX in gphoto2/main.c

---
 gphoto2/main.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/gphoto2/main.c
+++ b/gphoto2/main.c
@@ -43,7 +43,6 @@
 #include <locale.h>
 #include <fcntl.h>
 #include <utime.h>
-#include <limits.h>
 #include <errno.h>
 #include <sys/time.h>
 
@@ -2185,7 +2184,7 @@ main (int argc, char **argv, char **envp
 		}	
 	}
 	if (!gp_params.hook_script) {
-		char buf[PATH_MAX];
+		char buf[256];
 		if (gp_setting_get("gphoto2","hook-script",buf)>=0) {
 			gp_params.hook_script = strdup(buf);
 			/* Run init hook */