[source] tools/mtd-utils: include sysmacros.h explicitly

LEDE Commits lede-commits at lists.infradead.org
Fri Oct 27 02:20:57 PDT 2017


mkresin pushed a commit to source.git, branch master:
https://git.lede-project.org/855d210f656961cb989c2741748942414dbdefb7

commit 855d210f656961cb989c2741748942414dbdefb7
Author: Alex Maclean <monkeh at monkeh.net>
AuthorDate: Mon Oct 23 13:47:33 2017 +0100

    tools/mtd-utils: include sysmacros.h explicitly
    
    glibc is moving to remove the include of sys/sysmacros.h from
    sys/types.h, and some distros have done this early. Other libcs may
    already lack this include. Include sysmacros.h explicitly.
    
    Fixes: FS#1015
    
    Signed-off-by: Alex Maclean <monkeh at monkeh.net>
    [refresh patches]
    Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 .../mtd-utils/patches/120-include_sysmacros.patch  | 25 ++++++++++++++++++++++
 .../patches/320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch |  6 ++----
 2 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/tools/mtd-utils/patches/120-include_sysmacros.patch b/tools/mtd-utils/patches/120-include_sysmacros.patch
new file mode 100644
index 0000000..81ba1cf
--- /dev/null
+++ b/tools/mtd-utils/patches/120-include_sysmacros.patch
@@ -0,0 +1,25 @@
+From 9a06f45ec71116d76ee4b268ebe1b33d45b06fc0 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier at gentoo.org>
+Date: Sat, 16 Apr 2016 22:10:43 -0400
+Subject: [PATCH mtd-utils] include sys/sysmacros.h for major/minor/makedev
+
+These functions have always been defined in sys/sysmacros.h under
+Linux C libraries.  For some, including sys/types.h implicitly
+includes that as well, but glibc wants to deprecate that, and some
+others already have.  Include the header explicitly for the funcs.
+
+Signed-off-by: Mike Frysinger <vapier at gentoo.org>
+---
+ include/common.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/include/common.h
++++ b/include/common.h
+@@ -27,6 +27,7 @@
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <inttypes.h>
++#include <sys/sysmacros.h>
+ #include "version.h"
+ 
+ #ifndef PROGRAM_NAME
diff --git a/tools/mtd-utils/patches/320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch b/tools/mtd-utils/patches/320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch
index 46014e7..70e6a7e 100644
--- a/tools/mtd-utils/patches/320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch
+++ b/tools/mtd-utils/patches/320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch
@@ -1,7 +1,5 @@
-Index: mtd-utils-1.5.2/mkfs.jffs2.c
-===================================================================
---- mtd-utils-1.5.2.orig/mkfs.jffs2.c
-+++ mtd-utils-1.5.2/mkfs.jffs2.c
+--- a/mkfs.jffs2.c
++++ b/mkfs.jffs2.c
 @@ -108,7 +108,7 @@ static char *rootdir = default_rootdir;
  static int verbose = 0;
  static int squash_uids = 0;



More information about the lede-commits mailing list