mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-30 01:33:01 +00:00
Use the correct definition to obtain snprintf(3)
At some point snprintf(3) prototype became guarded off in stdio.h. Defining _C99_SOURCE makes it visible. On legacy Darwin, such a guard was not present so the definition has no impact on the build, but on "modern" macos it has the desired effect. Build tested on OS X 10.4 and macos 10.15.
This commit is contained in:
parent
b5b3177c68
commit
305b8469b0
2 changed files with 1 additions and 5 deletions
2
build.sh
2
build.sh
|
@ -79,7 +79,7 @@ MSYS_NT*|MINGW*) # MSYS2 on Windows
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
Darwin) # macOS
|
Darwin) # macOS
|
||||||
CFLAGS="${CFLAGS} -Wno-typedef-redefinition"
|
CFLAGS="${CFLAGS} -Wno-typedef-redefinition -D_C99_SOURCE"
|
||||||
UXNEMU_LDFLAGS="$(brew --prefix)/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')"
|
UXNEMU_LDFLAGS="$(brew --prefix)/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')"
|
||||||
;;
|
;;
|
||||||
Linux|*)
|
Linux|*)
|
||||||
|
|
|
@ -26,10 +26,6 @@
|
||||||
#define PATH_MAX 4096
|
#define PATH_MAX 4096
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
int snprintf(char *, unsigned long, const char *, ...);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "../uxn.h"
|
#include "../uxn.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue