diff -Nurd -x'*~' grep-3.1.orig/gnulib-tests/vasnprintf.c grep-3.1/gnulib-tests/vasnprintf.c --- grep-3.1.orig/gnulib-tests/vasnprintf.c 2017-05-20 20:32:47.000000000 -0400 +++ grep-3.1/gnulib-tests/vasnprintf.c 2017-12-30 17:56:06.000000000 -0500 @@ -4869,7 +4869,7 @@ #endif *fbp = dp->conversion; #if USE_SNPRINTF -# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) +# if !defined(__APPLE__) && !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) fbp[1] = '%'; fbp[2] = 'n'; fbp[3] = '\0';