Percona Server 5.7.20-19 fails to compile on macOS due to the following errors (https://github.com/Homebrew/homebrew-core/pull/22514):
[ 2%] Building C object strings/CMakeFiles/strings.dir/ctype-sjis.c.o
cd /tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/strings && /usr/local/Homebrew/Library/Homebrew/shims/super/clang -DDISABLE_MYSQL_THREAD_H -DHAVE_CONFIG_H -DHAVE_LIBEVENT1 -I/tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/include -I/tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/extra/rapidjson/include -I/tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/libbinlogevents/include -I/tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/libbinlogevents/export -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -DNDEBUG -DDBUG_OFF -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -o CMakeFiles/strings.dir/ctype-sjis.c.o -c /tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/strings/ctype-sjis.c
In file included from /tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/strings/ctype-simple.c:19:
/tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/include/my_sys.h:582:6: error: conflicting types for 'memset_s'
void memset_s(void *dest, size_t dest_max, int c, size_t n);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/string.h:145:9: note: previous declaration is here
errno_t memset_s(void *__s, rsize_t __smax, int __c, rsize_t __n) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
^
1 error generated.
[ 17%] Building C object mysys/CMakeFiles/mysys.dir/my_mkdir.c.o
cd /tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/mysys && /usr/local/Homebrew/Library/Homebrew/shims/super/clang -DHAVE_CONFIG_H -DHAVE_LIBEVENT1 -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/include -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/extra/rapidjson/include -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/libbinlogevents/include -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/libbinlogevents/export -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/mysys -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -DNDEBUG -DDBUG_OFF -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -o CMakeFiles/mysys.dir/my_mkdir.c.o -c /tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/mysys/my_mkdir.c
[ 17%] Building C object mysys/CMakeFiles/mysys.dir/my_mmap.c.o
cd /tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/mysys && /usr/local/Homebrew/Library/Homebrew/shims/super/clang -DHAVE_CONFIG_H -DHAVE_LIBEVENT1 -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/include -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/extra/rapidjson/include -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/libbinlogevents/include -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/libbinlogevents/export -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/mysys -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -DNDEBUG -DDBUG_OFF -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -o CMakeFiles/mysys.dir/my_mmap.c.o -c /tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/mysys/my_mmap.c
/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/mysys/my_malloc.c:327:6: error: conflicting types for 'memset_s'
void memset_s(void *dest, size_t dest_max, int c, size_t n)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/string.h:145:9: note: previous declaration is here
errno_t memset_s(void *__s, rsize_t __smax, int __c, rsize_t __n) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
^
1 error generated.
Robert, can you take a look?