From d6078cf20244e6651aea5832e6b78b3aa3459766 Mon Sep 17 00:00:00 2001 From: jianzhang4 Date: Wed, 9 Dec 2020 11:41:17 +0800 Subject: [PATCH] Fix build errors for macOS PR #1960 Signed-off-by: Romain Vimont --- app/src/sys/unix/command.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/sys/unix/command.c b/app/src/sys/unix/command.c index 64a54e71..09925c50 100644 --- a/app/src/sys/unix/command.c +++ b/app/src/sys/unix/command.c @@ -5,6 +5,10 @@ // modern glibc will complain without this #define _DEFAULT_SOURCE +#ifdef __APPLE__ +# define _DARWIN_C_SOURCE // for strdup(), strtok_r(), memset_pattern4() +#endif + #include "command.h" #include "config.h"