I am having the same issue on Fedora, it seems to be a problem with the openssl complier script.
test/v3ext.c: In function 'test_addr_ranges':
test/v3ext.c:201:24: error: implicit declaration of function 'memcmp' [-Wimplicit-function-declaration]
201 | if (!TEST_true(memcmp(ip1->data, ip2->data, ip1->length) <= 0))
| ~~
test/testutil.h:360:66: note: in definition of macro 'TEST_true'
360 | # define TEST_true(a) test_true(FILE, LINE, #a, (a) != 0)
| ^
test/v3ext.c:18:1: note: include '<string.h>' or provide a declaration of 'memcmp'
17 | #include "testutil.h"
+++ |+#include <string.h>
18 |
test/v3ext.c:201:56: warning: 'memcmp' argument 3 type is 'int' where 'long unsigned int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
201 | if (!TEST_true(memcmp(ip1->data, ip2->data, ip1->length) <= 0))
| ~^~~~~
test/testutil.h:360:66: note: in definition of macro 'TEST_true'
360 | # define TEST_true(a) test_true(FILE, LINE, #a, (a) != 0)
| ^
<built-in>: note: built-in 'memcmp' declared here
make[3]: *** [Makefile:9306: test/v3ext.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/www/server/nginx/src/openssl'
make[2]: *** [Makefile:174: all] Error 2
make[2]: Leaving directory '/www/server/nginx/src/openssl'
make[1]: *** [objs/Makefile:2532: /www/server/nginx/src/openssl/.openssl/include/openssl/ssl.h] Error 2
make[1]: Leaving directory '/www/server/nginx/src'
make: *** [Makefile:10: build] Error 2