From 8731b5f08d24114d5d27f4a87b996af71152fbf5 Mon Sep 17 00:00:00 2001 From: jianzhang4 Date: Wed, 9 Dec 2020 11:41:17 +0800 Subject: [PATCH] fix build error for macOS. --- 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..29f956a3 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 memset_pattern4() */ +#endif + #include "command.h" #include "config.h"