FreeBSD defines gettimeofday in <sys/time.h> (same as MacOS, as this is based on BSD), but the precompiler if-else ends up using the Linux block as __GNUC__ is also defined.
GETTIMEOFDAY(2) FreeBSD System Calls Manual GETTIMEOFDAY(2)
NAME
gettimeofday, settimeofday – get/set date and time
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <sys/time.h>
int
gettimeofday(struct timeval *tp, struct timezone *tzp);
Godot version
4.0.dev (c6d2768a19)
System information
FreeBSD 13.0-RELEASE-p4, clang version 13.0.0
Issue description
Compile error on FreeBSD when
basis_universal
module is enabled due to wrong#include
directive.FreeBSD defines
gettimeofday
in<sys/time.h>
(same as MacOS, as this is based on BSD), but the precompiler if-else ends up using the Linux block as__GNUC__
is also defined.define
man page
thirdparty/basis_universal/encoder/basisu_enc.cpp:198
Steps to reproduce
scons verbose=yes platform=linuxbsd use_llvm=yes use_lld=yes builtin_icu=no module_text_server_adv_enabled=no module_text_server_fb_enabled=yes module_basis_universal_enabled=yes
Minimal reproduction project
No response