[OpenWrt-Devel] [PATCH 03/05] [tools] mtd-utils glibc >= 2.23 compat

Weedy weedy2887 at gmail.com
Mon Apr 25 12:59:01 EDT 2016


With the update to glibc 2.23, sys/types.h doesn't inherit
sys/sysmacros.h anymore. We need to include it manually.

Signed-off-by: Weedy <weedy2887 at gmail.com>

--- /dev/null	2016-04-18 05:53:30.273258717 -0400
+++ tools/mtd-utils/patches/125-glibc-2.23-sysmacros.patch	2016-04-24
15:31:35.050480434 -0400
@@ -0,0 +1,50 @@
+--- a/lib/libmtd.c	2016-04-24 15:19:05.999661494 -0400
++++ b/lib/libmtd.c	2016-04-24 15:19:12.316391945 -0400
+@@ -29,6 +29,7 @@
+ #include <fcntl.h>
+ #include <dirent.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+ #include <inttypes.h>
+--- a/lib/libmtd_legacy.c	2016-04-24 15:19:31.323250535 -0400
++++ b/lib/libmtd_legacy.c	2016-04-24 15:19:35.886629947 -0400
+@@ -29,6 +29,7 @@
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+ #include <mtd/mtd-user.h>
+--- a/mkfs.ubifs/mkfs.ubifs.h	2016-04-24 15:26:48.110969877 -0400
++++ b/mkfs.ubifs/mkfs.ubifs.h	2016-04-24 15:27:15.347906492 -0400
+@@ -46,6 +46,7 @@
+
+ #include <getopt.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+ #include <fcntl.h>
+--- a/ubi-utils/libubi.c	2016-04-24 15:12:47.639174301 -0400
++++ b/ubi-utils/libubi.c	2016-04-24 15:12:57.779276691 -0400
+@@ -32,6 +32,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <libubi.h>
+ #include "libubi_int.h"
+ #include "common.h"
+--- a/mkfs.jffs2.c
++++ b/mkfs.jffs2.c
+@@ -50,6 +50,7 @@
+ #define PROGRAM_NAME "mkfs.jffs2"
+
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <stdio.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list