Fix NetBSD compilation

This commit is contained in:
Nathan Fisher 2023-08-22 03:27:03 -04:00
parent da412f754c
commit 4cf22a1373
2 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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);
}