So that seemed to get me a little further and I think you are right, something is leaking through. I had tried switching to g++ but that caused other issues and it was failing earlier in the build process. So the two errors are gone now but I’m getting the following:
/opt/homebrew/Cellar/gcc@13/13.3.0/bin/gcc-13 -O2 -Wall -Wno-trigraphs -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wsign-compare -Wno-multichar -DFS_SHELL -D_FSSH_AUTO_LOCKER_H=1 -D_FSSH_STACK_H=1 -c "../src/add-ons/kernel/file_systems/fat/bsd/kern/subr_clock.c" -DHAIKU_BUILD_COMPATIBILITY_H -D_NO_INLINE_ASM -D__NO_INLINE__ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAIKU_HOST_USE_XATTR -DHAIKU_HOST_PLATFORM_DARWIN -DHAIKU_HOST_PLATFORM_64_BIT -DHAIKU_PACKAGING_ARCH=\"x86_64\" -iquote ../build/user_config_headers -iquote ../build/config_headers -iquote ../src/tools/fat_shell -iquote objects/common/tools/fat_shell -iquote objects/darwin/common/tools/fat_shell -iquote objects/haiku/x86_64/common/tools/fat_shell -iquote ../src/add-ons/kernel/file_systems/fat -iquote ../src/add-ons/kernel/file_systems/fat/bsd/fs/msdosfs -iquote ../src/add-ons/kernel/file_systems/fat/bsd/kern -iquote ../src/add-ons/kernel/file_systems/fat/bsd/libkern -iquote ../src/add-ons/kernel/file_systems/fat/bsd/vm -iquote ../src/tools/fs_shell -I ../headers/private/shared -I ../headers/private/storage -I ../headers/private/file_systems -I ../headers/private/fs_shell -I ../src/add-ons/kernel/file_systems/fat/bsd -I ../headers/build/host/darwin -I ../src/build/libgnuregex -I /opt/local/include -I /usr/local/include -I /opt/homebrew/include -o "objects/darwin/release/tools/fat_shell/subr_clock.o"
In file included from ../src/add-ons/kernel/file_systems/fat/bsd/kern/subr_clock.c:42:
../headers/private/fs_shell/fssh_api_wrapper.h:81: warning: "htonl" redefined
81 | #define htonl(x) fssh_htonl(x)
|
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/arm/endian.h:61,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/machine/endian.h:37,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/types.h:81,
from ../src/add-ons/kernel/file_systems/fat/bsd/sys/types.h:42,
from ../src/add-ons/kernel/file_systems/fat/bsd/kern/subr_clock.c:41:
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_endian.h:137: note: this is the location of the previous definition
137 | #define htonl(x) __DARWIN_OSSwapInt32(x)
|
../headers/private/fs_shell/fssh_api_wrapper.h:82: warning: "ntohl" redefined
82 | #define ntohl(x) fssh_ntohl(x)
|
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_endian.h:136: note: this is the location of the previous definition
136 | #define ntohl(x) __DARWIN_OSSwapInt32(x)
|
../headers/private/fs_shell/fssh_api_wrapper.h:83: warning: "htons" redefined
83 | #define htons(x) fssh_htons(x)
|
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_endian.h:134: note: this is the location of the previous definition
134 | #define htons(x) __DARWIN_OSSwapInt16(x)
|
../headers/private/fs_shell/fssh_api_wrapper.h:84: warning: "ntohs" redefined
84 | #define ntohs(x) fssh_ntohs(x)
|
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_endian.h:133: note: this is the location of the previous definition
133 | #define ntohs(x) __DARWIN_OSSwapInt16(x)
|
../headers/private/fs_shell/fssh_api_wrapper.h:1364: warning: "memcpy" redefined
1364 | #define memcpy fssh_memcpy
|
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/_string.h:188,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/string.h:58,
from ../headers/private/fs_shell/fssh_api_wrapper.h:9:
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/secure/_string.h:62: note: this is the location of the previous definition
62 | #define memcpy(dest, ...) \
|
../headers/private/fs_shell/fssh_api_wrapper.h:1366: warning: "memmove" redefined
1366 | #define memmove fssh_memmove
|
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/secure/_string.h:69: note: this is the location of the previous definition
69 | #define memmove(dest, ...) \
|
../headers/private/fs_shell/fssh_api_wrapper.h:1367: warning: "memset" redefined
1367 | #define memset fssh_memset
|
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/secure/_string.h:76: note: this is the location of the previous definition
76 | #define memset(dest, ...) \
|
../headers/private/fs_shell/fssh_api_wrapper.h:1370: warning: "strcpy" redefined
1370 | #define strcpy fssh_strcpy
|
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/secure/_string.h:83: note: this is the location of the previous definition
83 | #define strcpy(dest, ...) \
|
../headers/private/fs_shell/fssh_api_wrapper.h:1371: warning: "strncpy" redefined
1371 | #define strncpy fssh_strncpy
|
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/secure/_string.h:127: note: this is the location of the previous definition
127 | #define strncpy(dest, ...) \
|
../headers/private/fs_shell/fssh_api_wrapper.h:1372: warning: "strcat" redefined
1372 | #define strcat fssh_strcat
|
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/secure/_string.h:134: note: this is the location of the previous definition
134 | #define strcat(dest, ...) \
|
../headers/private/fs_shell/fssh_api_wrapper.h:1373: warning: "strncat" redefined
1373 | #define strncat fssh_strncat
|
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/secure/_string.h:142: note: this is the location of the previous definition
142 | #define strncat(dest, ...) \
|
../headers/private/fs_shell/fssh_api_wrapper.h:1396: warning: "stpcpy" redefined
1396 | #define stpcpy fssh_stpcpy
|
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/secure/_string.h:91: note: this is the location of the previous definition
91 | #define stpcpy(dest, ...) \
|
../headers/private/fs_shell/fssh_api_wrapper.h:1425:25: error: redefinition of 'struct fssh_timespec'
1425 | #define timespec fssh_timespec
| ^~~~~~~~~~~~~
In file included from ../headers/private/fs_shell/fssh_stat.h:10,
from ../headers/private/fs_shell/fssh_api_wrapper.h:21:
../headers/private/fs_shell/fssh_time.h:28:8: note: originally defined here
28 | struct fssh_timespec {
| ^~~~~~~~~~~~~
../headers/private/fs_shell/fssh_api_wrapper.h:1427:33: error: redefinition of 'struct fssh_tm'
1427 | #define tm fssh_tm
| ^~~~~~~
../headers/private/fs_shell/fssh_time.h:38:8: note: originally defined here
38 | struct fssh_tm {
| ^~~~~~~
../headers/private/fs_shell/fssh_api_wrapper.h:1438:25: error: conflicting types for 'fssh_asctime'; have 'char *(const struct fssh_tm *)'
1438 | #define asctime fssh_asctime
| ^~~~~~~~~~~~
../headers/private/fs_shell/fssh_time.h:66:42: note: previous declaration of 'fssh_asctime' with type 'char *(const struct fssh_tm *)'
66 | extern char *fssh_asctime(const struct fssh_tm *tm);
| ^~~~~~~~~~~~
../headers/private/fs_shell/fssh_api_wrapper.h:1442:25: error: conflicting types for 'fssh_gmtime'; have 'struct fssh_tm *(const fssh_time_t *)' {aka 'struct fssh_tm *(const long long int *)'}
1442 | #define gmtime fssh_gmtime
| ^~~~~~~~~~~
../headers/private/fs_shell/fssh_time.h:71:26: note: previous declaration of 'fssh_gmtime' with type 'struct fssh_tm *(const fssh_time_t *)' {aka 'struct fssh_tm *(const long long int *)'}
71 | extern struct fssh_tm *fssh_gmtime(const fssh_time_t *timer);
| ^~~~~~~~~~~
../headers/private/fs_shell/fssh_api_wrapper.h:1444:25: error: conflicting types for 'fssh_localtime'; have 'struct fssh_tm *(const fssh_time_t *)' {aka 'struct fssh_tm *(const long long int *)'}
1444 | #define localtime fssh_localtime
| ^~~~~~~~~~~~~~
../headers/private/fs_shell/fssh_time.h:74:26: note: previous declaration of 'fssh_localtime' with type 'struct fssh_tm *(const fssh_time_t *)' {aka 'struct fssh_tm *(const long long int *)'}
74 | extern struct fssh_tm *fssh_localtime(const fssh_time_t *timer);
| ^~~~~~~~~~~~~~
../headers/private/fs_shell/fssh_api_wrapper.h:1436:25: error: conflicting types for 'fssh_mktime'; have 'fssh_time_t(struct fssh_tm *)' {aka 'long long int(struct fssh_tm *)'}
1436 | #define mktime fssh_mktime
| ^~~~~~~~~~~
../headers/private/fs_shell/fssh_time.h:64:33: note: previous declaration of 'fssh_mktime' with type 'fssh_time_t(struct fssh_tm *)' {aka 'long long int(struct fssh_tm *)'}
64 | extern fssh_time_t fssh_mktime(struct fssh_tm *tm);
| ^~~~~~~~~~~
../headers/private/fs_shell/fssh_api_wrapper.h:1446:25: error: conflicting types for 'fssh_strftime'; have 'fssh_size_t(char * restrict, fssh_size_t, const char * restrict, const struct fssh_tm * restrict)' {aka 'long long unsigned int(char * restrict, long long unsigned int, const char * restrict, const struct fssh_tm * restrict)'}
1446 | #define strftime fssh_strftime
| ^~~~~~~~~~~~~
../headers/private/fs_shell/fssh_time.h:77:33: note: previous declaration of 'fssh_strftime' with type 'fssh_size_t(char *, fssh_size_t, const char *, const struct fssh_tm *)' {aka 'long long unsigned int(char *, long long unsigned int, const char *, const struct fssh_tm *)'}
77 | extern fssh_size_t fssh_strftime(char *buffer, fssh_size_t maxSize,
| ^~~~~~~~~~~~~
../headers/private/fs_shell/fssh_api_wrapper.h:1447:25: error: conflicting types for 'fssh_strptime'; have 'char *(const char * restrict, const char * restrict, struct fssh_tm * restrict)'
1447 | #define strptime fssh_strptime
| ^~~~~~~~~~~~~
../headers/private/fs_shell/fssh_time.h:79:34: note: previous declaration of 'fssh_strptime' with type 'char *(const char *, const char *, struct fssh_tm *)'
79 | extern char *fssh_strptime(const char *buf, const char *format,
| ^~~~~~~~~~~~~
../headers/private/fs_shell/fssh_api_wrapper.h:1439:25: error: conflicting types for 'fssh_asctime_r'; have 'char *(const struct fssh_tm * restrict, char * restrict)'
1439 | #define asctime_r fssh_asctime_r
| ^~~~~~~~~~~~~~
../headers/private/fs_shell/fssh_time.h:67:42: note: previous declaration of 'fssh_asctime_r' with type 'char *(const struct fssh_tm *, char *)'
67 | extern char *fssh_asctime_r(const struct fssh_tm *timep,
| ^~~~~~~~~~~~~~
../headers/private/fs_shell/fssh_api_wrapper.h:1443:25: error: conflicting types for 'fssh_gmtime_r'; have 'struct fssh_tm *(const fssh_time_t * restrict, struct fssh_tm * restrict)' {aka 'struct fssh_tm *(const long long int * restrict, struct fssh_tm * restrict)'}
1443 | #define gmtime_r fssh_gmtime_r
| ^~~~~~~~~~~~~
../headers/private/fs_shell/fssh_time.h:72:26: note: previous declaration of 'fssh_gmtime_r' with type 'struct fssh_tm *(const fssh_time_t *, struct fssh_tm *)' {aka 'struct fssh_tm *(const long long int *, struct fssh_tm *)'}
72 | extern struct fssh_tm *fssh_gmtime_r(const fssh_time_t *timer,
| ^~~~~~~~~~~~~
../headers/private/fs_shell/fssh_api_wrapper.h:1445:25: error: conflicting types for 'fssh_localtime_r'; have 'struct fssh_tm *(const fssh_time_t * restrict, struct fssh_tm * restrict)' {aka 'struct fssh_tm *(const long long int * restrict, struct fssh_tm * restrict)'}
1445 | #define localtime_r fssh_localtime_r
| ^~~~~~~~~~~~~~~~
../headers/private/fs_shell/fssh_time.h:75:26: note: previous declaration of 'fssh_localtime_r' with type 'struct fssh_tm *(const fssh_time_t *, struct fssh_tm *)' {aka 'struct fssh_tm *(const long long int *, struct fssh_tm *)'}
75 | extern struct fssh_tm *fssh_localtime_r(const fssh_time_t *timer,
| ^~~~~~~~~~~~~~~~
In file included from ../src/add-ons/kernel/file_systems/fat/dosfs.h:11,
from ../src/add-ons/kernel/file_systems/fat/bsd/sys/systm.h:51,
from ../src/add-ons/kernel/file_systems/fat/bsd/kern/subr_clock.c:50:
../src/add-ons/kernel/file_systems/fat/fssh_defines.h:26: warning: "howmany" redefined
26 | #define howmany(x, y) (((x) + ((y) - 1)) / (y))
|
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/types.h:191: note: this is the location of the previous definition
191 | #define howmany(x, y) __DARWIN_howmany(x, y) /* # y's == x bits? */
|