missing endian preprocessor defines on Linux environments

I'm compiling libwebsockets on different Debian environments, using my own GCC build toolchain. I'm just building a websocket client which connects to a Java websocket server.

Win32 works fine, but the Linux version fails with an invalid handshake. I tracked the issue down to sha-1.c producing invalid results because BYTE_ORDER, BIG_ENDIAN and LITTLE_ENDIAN are not defined, and the two '#if BYTE_ORDER == BIG_ENDIAN' directives are true. No idea if that's a valid or undefined preprocessor behavior.