Closed Calinou closed 2 years ago
Probably also relevant for NetBSD: https://man.netbsd.org/gettimeofday.2
And DragonFly BSD: https://leaf.dragonflybsd.org/cgi/web-man?command=gettimeofday§ion=ANY
Perhaps it could instead use a common define present on all that systems except Apple universe, like __unix__
, __unix
or unix
.
Then that line of code could be simply:
#elif defined(__APPLE__) || defined(__unix__)
Or, if it need to be somehow more precisse, something like which it is used here:
#elif defined(__APPLE__) || defined(__unix__) || defined(BSD)
Got it - thanks! I have used FreeBSD in the past, but I don't use it all the time.
Follow-up to https://github.com/BinomialLLC/basis_universal/pull/234. Downstream issues/PRs: https://github.com/godotengine/godot/pull/55139, https://github.com/godotengine/godot/issues/55138
Linux's
<sys/timex.h>
header was used instead of FreeBSD's <sys/time.h> due to missing preprocessor comparison.