Build warnings about unused functions when compiling on a libc without GLOB_ALTDIRFUNC
When compiling tor on a libc that lacks the GLOB_ALTDIRFUNC constant (e.g.: musl), I get the following warnings:
CC src/lib/fs/path.o
src/lib/fs/path.c:570:1: warning: 'wrap_closedir' defined but not used [-Wunused-function]
570 | wrap_closedir(void *arg)
| ^~~~~~~~~~~~~
src/lib/fs/path.c:560:1: warning: 'prot_lstat' defined but not used [-Wunused-function]
560 | prot_lstat(const char *pathname, struct stat *buf)
| ^~~~~~~~~~
src/lib/fs/path.c:549:1: warning: 'prot_stat' defined but not used [-Wunused-function]
549 | prot_stat(const char *pathname, struct stat *buf)
| ^~~~~~~~~
src/lib/fs/path.c:538:1: warning: 'prot_opendir' defined but not used [-Wunused-function]
538 | prot_opendir(const char *name)
| ^~~~~~~~~~~~
Happens on tor 0.4.5 and above.