Hi, I'm the maintainer of wget in MacPorts. In the version of clang included with Xcode 12 and later, implicit declaration of functions is an error.
During configure, wget 1.12.1 prints this: checking whether utime handles trailing slashes on files... no config.log contains this: configure:49368: checking whether utime handles trailing slashes on files configure:49414: ccache /usr/bin/clang -o conftest -DNDEBUG -pipe -Os -Werror=implicit-function-declaration -arch x86_64 -I/opt/local/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 conftest.c >&5 conftest.c:491:23: error: implicit declaration of function 'utime' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (!utime ("conftest.tmp/", NULL)) ^ 1 error generated. configure:49414: $? = 1 configure: program exited with status 1 So the results of this test don't represent what you want them to. This configure test uses #include <time.h>. The problem goes away if I change that to #include <utime.h>. Then configure output is still: checking whether utime handles trailing slashes on files... no but config.log then contains: configure:49368: checking whether utime handles trailing slashes on files configure:49414: ccache /usr/bin/clang -o conftest -DNDEBUG -pipe -Os -Werror=implicit-function-declaration -arch x86_64 -I/opt/local/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 conftest.c >&5 configure:49414: $? = 0 configure:49414: ./conftest configure:49414: $? = 2 configure: program exited with status 2 Now the results of the test are accurate. I included this patch in the MacPorts wget 1.12.1 port: https://github.com/macports/macports-ports/blob/13fd7facb9e1ea9e70b79c8c0b429058b9bb8698/net/wget/files/implicit.patch Of course you'll want to patch m4/utime.m4 instead of configure.