diff --git a/Makefile b/Makefile index f58bced..0dedbdf 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ CFLAGS += -std=c99 -D_POSIX_C_SOURCE=200112L CFLAGS += -Iinclude/ TOOLS = fexc bin2fex fex2bin bootinfo fel pio -TOOLS += nand-part +#TOOLS += nand-part MISC_TOOLS = phoenix_info @@ -35,7 +35,7 @@ all: $(TOOLS) misc: $(MISC_TOOLS) clean: - @rm -vf $(TOOLS) $(MISC_TOOLS) *.o *.elf *.sunxi *.bin *.nm *.orig + @rm -f $(TOOLS) $(MISC_TOOLS) *.o *.elf *.sunxi *.bin *.nm *.orig $(TOOLS): Makefile common.h diff --git a/include/endian_compat.h b/include/endian_compat.h index e463a52..87df471 100644 --- a/include/endian_compat.h +++ b/include/endian_compat.h @@ -29,6 +29,10 @@ #define le32toh(x) CFSwapInt32LittleToHost(x) #define htole16(x) CFSwapInt16HostToLittle(x) #define le16toh(x) CFSwapInt16LittleToHost(x) +#elif defined(__OpenBSD__) +#include +#define le32toh(x) letoh32(x) +#define le16toh(x) letoh16(x) #else #include #endif