Commit 17f6b01ef5ff545f58db11d98d020e8f3c977dd7
1 parent
45c7237d
Fix cross-platform building
Commit 45c7237d9dc2 ("Fixup for recent firmware inclusion changes") breaks builds on non-Apple platforms. Fix it for platforms that already have fmemopen - others may still need attention. See: https://github.com/raspberrypi/usbboot/issues/47 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Showing
1 changed file
with
1 additions
and
1 deletions
main.c
| ... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 | #include "msd/start.h" |
| 10 | 10 | |
| 11 | 11 | /* Assume BSD without native fmemopen() if doesn't seem to be glibc */ |
| 12 | -#if defined(__APPLE__) || !defined(_GNU_SOURCE) || !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200809L | |
| 12 | +#if defined(__APPLE__) || (!defined(_GNU_SOURCE) && (!defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200809L)) | |
| 13 | 13 | #include "fmemopen.c" // BSD fmemopen() compat in terms of funopen() |
| 14 | 14 | #endif |
| 15 | 15 | ... | ... |