diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 9f7901f00..68382b7d7 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -54,6 +54,7 @@ ExternalProject_Add(mksquashfs GIT_TAG 5be5d61 UPDATE_COMMAND "" # ${MAKE} sure CMake won't try to fetch updates unnecessarily and hence rebuild the dependency every time PATCH_COMMAND patch -N -p1 < ${PROJECT_SOURCE_DIR}/src/mksquashfs-mkfs-fixed-timestamp.patch || true + COMMAND patch -N -p1 < ${PROJECT_SOURCE_DIR}/src/mksquashfs-build-fix.patch || true CONFIGURE_COMMAND ${SED} -i "s|CFLAGS += -DXZ_SUPPORT|CFLAGS += ${mksquashfs_cflags}|g" /squashfs-tools/Makefile COMMAND ${SED} -i "s|LIBS += -llzma|LIBS += -Bstatic ${mksquashfs_ldflags}|g" /squashfs-tools/Makefile COMMAND ${SED} -i "s|install: mksquashfs unsquashfs|install: mksquashfs|g" squashfs-tools/Makefile diff --git a/src/mksquashfs-build-fix.patch b/src/mksquashfs-build-fix.patch new file mode 100644 index 000000000..861014077 --- /dev/null +++ b/src/mksquashfs-build-fix.patch @@ -0,0 +1,24 @@ +diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c +index d696a51..776e63e 100644 +--- a/squashfs-tools/mksquashfs.c ++++ b/squashfs-tools/mksquashfs.c +@@ -49,6 +49,7 @@ + #include + #include + #include ++#include + + #ifndef linux + #define __BYTE_ORDER BYTE_ORDER +diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c +index a57f85c..8b39ed2 100644 +--- a/squashfs-tools/unsquashfs.c ++++ b/squashfs-tools/unsquashfs.c +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + + struct cache *fragment_cache, *data_cache; + struct queue *to_reader, *to_inflate, *to_writer, *from_writer;