mtd-utils: add back macOS compatibility code that was dropped during the update
authorFelix Fietkau <nbd@nbd.name>
Mon, 30 Apr 2018 08:09:48 +0000 (10:09 +0200)
committerFelix Fietkau <nbd@nbd.name>
Mon, 30 Apr 2018 08:12:55 +0000 (10:12 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
tools/mtd-utils/Makefile

index 1527d10579e23ff71b82f98b5a8d69e69b77fef9..ff000b99e3ab05aeee77ac99eb0b93b687da2310 100644 (file)
@@ -17,6 +17,15 @@ PKG_FIXUP:=autoreconf
 
 include $(INCLUDE_DIR)/host-build.mk
 
+ifneq ($(HOST_OS),Linux)
+  HOST_CFLAGS += \
+       -I$(CURDIR)/include \
+       -Dloff_t=off_t \
+       -D__BYTE_ORDER=BYTE_ORDER \
+       -include endian.h \
+       -DNO_NATIVE_SUPPORT \
+       -include fls.h
+endif
 
 HOST_CONFIGURE_VARS+= \
        UUID_CFLAGS="-I$(STAGING_DIR_HOST)/include/e2fsprogs/uuid"
@@ -26,6 +35,9 @@ HOST_CONFIGURE_ARGS+= \
        --without-xattr \
        --without-lzo
 
+HOST_MAKE_FLAGS += \
+       PROGRAMS="mkfs.jffs2 ubinize mkfs.ubifs"
+
 define Host/Install
        $(CP) \
                $(HOST_BUILD_DIR)/mkfs.jffs2 \