Make selftest build and run on FreeBSD 10 with gmake

This commit is contained in:
Adam Ierymenko 2014-11-04 11:20:38 -08:00
parent 14e4ffd15f
commit 1bd5a1ebcd
5 changed files with 109 additions and 0 deletions

View file

@ -58,6 +58,21 @@
#include <endian.h>
#endif
#ifdef __FreeBSD__
#ifndef __UNIX_LIKE__
#define __UNIX_LIKE__
#endif
#ifndef __BSD__
#define __BSD__
#endif
#include <machine/endian.h>
#ifndef __BYTE_ORDER
#define __BYTE_ORDER _BYTE_ORDER
#define __LITTLE_ENDIAN _LITTLE_ENDIAN
#define __BIG_ENDIAN _BIG_ENDIAN
#endif
#endif
// TODO: Android is what? Linux technically, but does it define it?
#ifdef __APPLE__