diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2017-04-26 08:58:17 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2017-04-26 20:20:26 +0200 |
commit | 7d9d71e67f8763b0db96545e124c002fe0ba7e73 (patch) | |
tree | dd807d86e63727df9c864fde0866d8ccbf9a7feb /package/mtd-utils/patches | |
parent | 0510be4cc4affbc497040486d3d4a0a271985ba9 (diff) |
mtd-utils: allow host-tools to compile on Darwin
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Diffstat (limited to 'package/mtd-utils/patches')
9 files changed, 114 insertions, 0 deletions
diff --git a/package/mtd-utils/patches/patch-Makefile_in b/package/mtd-utils/patches/patch-Makefile_in new file mode 100644 index 000000000..ddcbcf9e3 --- /dev/null +++ b/package/mtd-utils/patches/patch-Makefile_in @@ -0,0 +1,11 @@ +--- mtd-utils-2.0.0.orig/Makefile.in 2016-12-22 11:21:54.000000000 +0100 ++++ mtd-utils-2.0.0/Makefile.in 2017-04-26 09:13:34.000000000 +0200 +@@ -232,7 +232,7 @@ am__EXEEXT_11 = ftl_format$(EXEEXT) doc_ + flash_lock$(EXEEXT) flash_unlock$(EXEEXT) \ + flash_otp_info$(EXEEXT) flash_otp_dump$(EXEEXT) \ + flash_otp_lock$(EXEEXT) flash_otp_write$(EXEEXT) \ +- flashcp$(EXEEXT) mtdpart$(EXEEXT) ++ flashcp$(EXEEXT) + am__EXEEXT_12 = nanddump$(EXEEXT) nandwrite$(EXEEXT) nandtest$(EXEEXT) \ + nftldump$(EXEEXT) nftl_format$(EXEEXT) + am__EXEEXT_13 = rfddump$(EXEEXT) rfdformat$(EXEEXT) diff --git a/package/mtd-utils/patches/patch-include_common_h b/package/mtd-utils/patches/patch-include_common_h new file mode 100644 index 000000000..1109ab485 --- /dev/null +++ b/package/mtd-utils/patches/patch-include_common_h @@ -0,0 +1,19 @@ +--- mtd-utils-2.0.0.orig/include/common.h 2016-12-14 10:06:35.000000000 +0100 ++++ mtd-utils-2.0.0/include/common.h 2017-04-26 01:52:28.000000000 +0200 +@@ -26,10 +26,15 @@ + #include <string.h> + #include <fcntl.h> + #include <errno.h> ++#ifndef __APPLE__ + #include <features.h> ++#include <sys/sysmacros.h> ++#endif + #include <inttypes.h> + #include <unistd.h> +-#include <sys/sysmacros.h> ++ ++#include <time.h> ++#include "os-compat.h" + + #include "config.h" + diff --git a/package/mtd-utils/patches/patch-include_mtd_ubi-media_h b/package/mtd-utils/patches/patch-include_mtd_ubi-media_h new file mode 100644 index 000000000..c53899bfd --- /dev/null +++ b/package/mtd-utils/patches/patch-include_mtd_ubi-media_h @@ -0,0 +1,11 @@ +--- mtd-utils-2.0.0.orig/include/mtd/ubi-media.h 2016-07-12 14:16:45.000000000 +0200 ++++ mtd-utils-2.0.0/include/mtd/ubi-media.h 2017-04-25 21:14:34.000000000 +0200 +@@ -30,7 +30,7 @@ + #ifndef __UBI_MEDIA_H__ + #define __UBI_MEDIA_H__ + +-#include <asm/byteorder.h> ++#include <linux/types.h> + + /* The version of UBI images supported by this implementation */ + #define UBI_VERSION 1 diff --git a/package/mtd-utils/patches/patch-include_mtd_ubifs-media_h b/package/mtd-utils/patches/patch-include_mtd_ubifs-media_h new file mode 100644 index 000000000..471454799 --- /dev/null +++ b/package/mtd-utils/patches/patch-include_mtd_ubifs-media_h @@ -0,0 +1,11 @@ +--- mtd-utils-2.0.0.orig/include/mtd/ubifs-media.h 2016-07-12 14:16:45.000000000 +0200 ++++ mtd-utils-2.0.0/include/mtd/ubifs-media.h 2017-04-25 21:47:14.000000000 +0200 +@@ -33,7 +33,7 @@ + #ifndef __UBIFS_MEDIA_H__ + #define __UBIFS_MEDIA_H__ + +-#include <asm/byteorder.h> ++#include <linux/types.h> + + /* UBIFS node magic number (must not have the padding byte first or last) */ + #define UBIFS_NODE_MAGIC 0x06101831 diff --git a/package/mtd-utils/patches/patch-jffsX-utils_rbtree_h b/package/mtd-utils/patches/patch-jffsX-utils_rbtree_h new file mode 100644 index 000000000..7df21dc96 --- /dev/null +++ b/package/mtd-utils/patches/patch-jffsX-utils_rbtree_h @@ -0,0 +1,11 @@ +--- mtd-utils-2.0.0.orig/jffsX-utils/rbtree.h 2016-07-12 14:16:45.000000000 +0200 ++++ mtd-utils-2.0.0/jffsX-utils/rbtree.h 2017-04-26 02:27:35.000000000 +0200 +@@ -94,7 +94,7 @@ static inline struct page * rb_insert_pa + #ifndef _LINUX_RBTREE_H + #define _LINUX_RBTREE_H + +-#include <linux/kernel.h> ++#include <endian.h> + #include <linux/stddef.h> + + struct rb_node diff --git a/package/mtd-utils/patches/patch-misc-utils_docfdisk_c b/package/mtd-utils/patches/patch-misc-utils_docfdisk_c new file mode 100644 index 000000000..f3378c525 --- /dev/null +++ b/package/mtd-utils/patches/patch-misc-utils_docfdisk_c @@ -0,0 +1,10 @@ +--- mtd-utils-2.0.0.orig/misc-utils/docfdisk.c 2016-12-14 10:06:35.000000000 +0100 ++++ mtd-utils-2.0.0/misc-utils/docfdisk.c 2017-04-26 08:56:40.000000000 +0200 +@@ -19,6 +19,7 @@ + #define PROGRAM_NAME "docfdisk" + + #define _XOPEN_SOURCE 500 /* for pread/pwrite */ ++#include <sys/types.h> + #include <unistd.h> + #include <stdlib.h> + #include <stdio.h> diff --git a/package/mtd-utils/patches/patch-misc-utils_recv_image_c b/package/mtd-utils/patches/patch-misc-utils_recv_image_c new file mode 100644 index 000000000..ab07ab59a --- /dev/null +++ b/package/mtd-utils/patches/patch-misc-utils_recv_image_c @@ -0,0 +1,13 @@ +--- mtd-utils-2.0.0.orig/misc-utils/recv_image.c 2016-07-12 14:16:45.000000000 +0200 ++++ mtd-utils-2.0.0/misc-utils/recv_image.c 2017-04-26 09:06:48.000000000 +0200 +@@ -4,6 +4,10 @@ + #define _BSD_SOURCE /* struct ip_mreq */ + #define _DEFAULT_SOURCE + ++#ifndef IPV6_ADD_MEMBERSHIP ++#define IPV6_ADD_MEMBERSHIP 20 ++#endif ++ + #include <errno.h> + #include <stdio.h> + #include <netdb.h> diff --git a/package/mtd-utils/patches/patch-nand-utils_nftl_format_c b/package/mtd-utils/patches/patch-nand-utils_nftl_format_c new file mode 100644 index 000000000..ff25489ef --- /dev/null +++ b/package/mtd-utils/patches/patch-nand-utils_nftl_format_c @@ -0,0 +1,10 @@ +--- mtd-utils-2.0.0.orig/nand-utils/nftl_format.c 2016-12-14 10:06:35.000000000 +0100 ++++ mtd-utils-2.0.0/nand-utils/nftl_format.c 2017-04-26 08:57:07.000000000 +0200 +@@ -23,6 +23,7 @@ + #define PROGRAM_NAME "nftl_format" + + #define _XOPEN_SOURCE 500 /* for pread/pwrite */ ++#include <sys/types.h> + #include <unistd.h> + #include <stdlib.h> + #include <stdio.h> diff --git a/package/mtd-utils/patches/patch-ubifs-utils_mkfs_ubifs_defs_h b/package/mtd-utils/patches/patch-ubifs-utils_mkfs_ubifs_defs_h new file mode 100644 index 000000000..e3f61b1e7 --- /dev/null +++ b/package/mtd-utils/patches/patch-ubifs-utils_mkfs_ubifs_defs_h @@ -0,0 +1,18 @@ +--- mtd-utils-2.0.0.orig/ubifs-utils/mkfs.ubifs/defs.h 2016-07-12 14:16:45.000000000 +0200 ++++ mtd-utils-2.0.0/ubifs-utils/mkfs.ubifs/defs.h 2017-04-26 01:55:07.000000000 +0200 +@@ -39,6 +39,7 @@ struct qstr + size_t len; + }; + ++#ifndef __APPLE__ + /** + * fls - find last (most-significant) bit set + * @x: the word to search +@@ -74,6 +75,7 @@ static inline int fls(int x) + } + return r; + } ++#endif + + #define do_div(n,base) ({ \ + int __res; \ |