File: path_max.patch

package info (click to toggle)
sameboy 1.0.2%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 10,632 kB
  • sloc: ansic: 29,954; objc: 22,249; asm: 1,424; pascal: 1,373; makefile: 1,064; xml: 111
file content (29 lines) | stat: -rw-r--r-- 583 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
29
Description: fix for platforms that don't define PATH_MAX
Author: Sébastien Noel <sebastien@twolife.be>
Forwarded: TODO
--- a/SDL/main.c
+++ b/SDL/main.c
@@ -20,6 +20,10 @@
 #include "windows_associations.h"
 #endif
 
+#ifndef PATH_MAX
+# define PATH_MAX 4096
+#endif
+
 static bool stop_on_start = false;
 GB_gameboy_t gb;
 static bool paused = false;
--- a/SDL/utils.c
+++ b/SDL/utils.c
@@ -5,6 +5,10 @@
 #include <limits.h>
 #include "utils.h"
 
+#ifndef PATH_MAX
+# define PATH_MAX 4096
+#endif
+
 static const char *resource_folder(void)
 {
     static const char *ret = NULL;