Fix NetBSD compilation
This commit is contained in:
parent
da412f754c
commit
4cf22a1373
2 changed files with 4 additions and 2 deletions
4
Makefile
4
Makefile
|
@ -55,7 +55,9 @@ CFLAGS += -Wall -Werror
|
|||
CFLAGS += -Iinclude
|
||||
CFLAGS += -fPIC
|
||||
|
||||
LIBS += -lmd -lpthread
|
||||
# Comment this if on NetBSD or OpenBSD
|
||||
LIBS += -lmd
|
||||
LIBS += -lpthread
|
||||
|
||||
all: libhaggis.a libhaggis.so
|
||||
|
||||
|
|
2
bytes.c
2
bytes.c
|
@ -37,7 +37,7 @@
|
|||
#include "bytes.h"
|
||||
#include "haggis.h"
|
||||
|
||||
#if __BYTE_ORDER__ == __LITTLE_ENDIAN
|
||||
#if __BYTE_ORDER__ == __LITTLE_ENDIAN || _BYTE_ORDER == _LITTLE_ENDIAN
|
||||
int load_u16(FILE *stream, u16 *num) {
|
||||
return fread(&num->bytes, 1, 2, stream);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue