Fix build errors for macOS

PR #1960 <https://github.com/Genymobile/scrcpy/pull/1960>

Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
jianzhang4 2020-12-09 11:41:17 +08:00 committed by Romain Vimont
parent 47c8971267
commit d6078cf202

View file

@ -5,6 +5,10 @@
// modern glibc will complain without this // modern glibc will complain without this
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#ifdef __APPLE__
# define _DARWIN_C_SOURCE // for strdup(), strtok_r(), memset_pattern4()
#endif
#include "command.h" #include "command.h"
#include "config.h" #include "config.h"