BinomialLLC / basis_universal

Basis Universal GPU Texture Codec
Apache License 2.0
2.7k stars 263 forks source link

Unnecessary include of sys/timex.h #327

Open MarkCallow opened 2 years ago

MarkCallow commented 2 years ago

basisu_enc.cpp includes sys/timex.h when __GNUC__ is defined. This file has recently been removed from Emscripten because Emscripten doesn't implement the 2 functions defined there.

int adjtimex(struct timex *);                                                    
int clock_adjtime(clockid_t, struct timex *); 

basisu_enc.cpp isn't using them either. The gettimeofday function it does use is defined in sys/time.h which is included by sys/timex.h.

Please change the code to #include <sys/time.h> so special steps are not needed to build with Emscripten.