mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 06:08:08 +00:00
mdadm: Use upstream fix for musl 1.1.23 compile
Fixes:d720f83f87
("mdadm: Fix compile with musl 1.1.23") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commitebbec2fdc6
)
This commit is contained in:
parent
d720f83f87
commit
7d300326ee
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=mdadm
|
PKG_NAME:=mdadm
|
||||||
PKG_VERSION:=4.1
|
PKG_VERSION:=4.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm
|
PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm
|
||||||
|
@ -1,222 +1,29 @@
|
|||||||
From 1ee119c8026dff34a4d8c4269c05d3d4e0c25aa6 Mon Sep 17 00:00:00 2001
|
From 452dc4d13a012cdcb05088c0dbc699959c4d6c73 Mon Sep 17 00:00:00 2001
|
||||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
From: Baruch Siach <baruch@tkos.co.il>
|
||||||
Date: Sat, 3 Aug 2019 11:03:40 +0200
|
Date: Tue, 6 Aug 2019 16:05:23 +0300
|
||||||
Subject: [mdadm PATCH] Add missing include file sys/sysmacros.h
|
Subject: mdadm.h: include sysmacros.h unconditionally
|
||||||
|
|
||||||
This include file is needed for makedev(), major() and minor() which are
|
musl libc now also requires sys/sysmacros.h for the major/minor macros.
|
||||||
used in these functions. In musl 1.1.23 sys/sysmacros.h is not included
|
All supported libc implementations carry sys/sysmacros.h, including
|
||||||
indirectly any more and mdadm fails to compile.
|
diet-libc, klibc, and uclibc-ng.
|
||||||
|
|
||||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
Cc: Hauke Mehrtens <hauke@hauke-m.de>
|
||||||
|
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||||
|
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
|
||||||
---
|
---
|
||||||
Assemble.c | 1 +
|
mdadm.h | 2 --
|
||||||
Build.c | 1 +
|
1 file changed, 2 deletions(-)
|
||||||
Create.c | 1 +
|
|
||||||
Detail.c | 1 +
|
|
||||||
Grow.c | 1 +
|
|
||||||
Incremental.c | 1 +
|
|
||||||
Manage.c | 1 +
|
|
||||||
Monitor.c | 1 +
|
|
||||||
Query.c | 1 +
|
|
||||||
lib.c | 1 +
|
|
||||||
mapfile.c | 1 +
|
|
||||||
mdadm.c | 1 +
|
|
||||||
mdopen.c | 1 +
|
|
||||||
platform-intel.c | 1 +
|
|
||||||
policy.c | 1 +
|
|
||||||
super-ddf.c | 1 +
|
|
||||||
super-intel.c | 1 +
|
|
||||||
sysfs.c | 1 +
|
|
||||||
util.c | 1 +
|
|
||||||
19 files changed, 19 insertions(+)
|
|
||||||
|
|
||||||
--- a/Assemble.c
|
--- a/mdadm.h
|
||||||
+++ b/Assemble.c
|
+++ b/mdadm.h
|
||||||
@@ -24,6 +24,7 @@
|
@@ -45,10 +45,8 @@ extern __off64_t lseek64 __P ((int __fd,
|
||||||
|
#include <errno.h>
|
||||||
#include "mdadm.h"
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <syslog.h>
|
||||||
+#include <sys/sysmacros.h>
|
-#ifdef __GLIBC__
|
||||||
|
/* Newer glibc requires sys/sysmacros.h directly for makedev() */
|
||||||
static int name_matches(char *found, char *required, char *homehost, int require_homehost)
|
#include <sys/sysmacros.h>
|
||||||
{
|
-#endif
|
||||||
--- a/Build.c
|
#ifdef __dietlibc__
|
||||||
+++ b/Build.c
|
#include <strings.h>
|
||||||
@@ -23,6 +23,7 @@
|
/* dietlibc has deprecated random and srandom!! */
|
||||||
*/
|
|
||||||
|
|
||||||
#include "mdadm.h"
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
|
|
||||||
int Build(char *mddev, struct mddev_dev *devlist,
|
|
||||||
struct shape *s, struct context *c)
|
|
||||||
--- a/Create.c
|
|
||||||
+++ b/Create.c
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
#include "md_u.h"
|
|
||||||
#include "md_p.h"
|
|
||||||
#include <ctype.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
|
|
||||||
static int default_layout(struct supertype *st, int level, int verbose)
|
|
||||||
{
|
|
||||||
--- a/Detail.c
|
|
||||||
+++ b/Detail.c
|
|
||||||
@@ -27,6 +27,7 @@
|
|
||||||
#include "md_u.h"
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <dirent.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
|
|
||||||
static int cmpstringp(const void *p1, const void *p2)
|
|
||||||
{
|
|
||||||
--- a/Grow.c
|
|
||||||
+++ b/Grow.c
|
|
||||||
@@ -27,6 +27,7 @@
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <signal.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
|
|
||||||
#if ! defined(__BIG_ENDIAN) && ! defined(__LITTLE_ENDIAN)
|
|
||||||
--- a/Incremental.c
|
|
||||||
+++ b/Incremental.c
|
|
||||||
@@ -29,6 +29,7 @@
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "mdadm.h"
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
#include <dirent.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
--- a/Manage.c
|
|
||||||
+++ b/Manage.c
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
#include "md_u.h"
|
|
||||||
#include "md_p.h"
|
|
||||||
#include <ctype.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
|
|
||||||
int Manage_ro(char *devname, int fd, int readonly)
|
|
||||||
{
|
|
||||||
--- a/Monitor.c
|
|
||||||
+++ b/Monitor.c
|
|
||||||
@@ -25,6 +25,7 @@
|
|
||||||
#include "mdadm.h"
|
|
||||||
#include "md_p.h"
|
|
||||||
#include "md_u.h"
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <limits.h>
|
|
||||||
--- a/Query.c
|
|
||||||
+++ b/Query.c
|
|
||||||
@@ -25,6 +25,7 @@
|
|
||||||
#include "mdadm.h"
|
|
||||||
#include "md_p.h"
|
|
||||||
#include "md_u.h"
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
|
|
||||||
int Query(char *dev)
|
|
||||||
{
|
|
||||||
--- a/lib.c
|
|
||||||
+++ b/lib.c
|
|
||||||
@@ -25,6 +25,7 @@
|
|
||||||
#include "mdadm.h"
|
|
||||||
#include "dlink.h"
|
|
||||||
#include <ctype.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
|
|
||||||
/* This fill contains various 'library' style function. They
|
|
||||||
* have no dependency on anything outside this file.
|
|
||||||
--- a/mapfile.c
|
|
||||||
+++ b/mapfile.c
|
|
||||||
@@ -44,6 +44,7 @@
|
|
||||||
*/
|
|
||||||
#include "mdadm.h"
|
|
||||||
#include <sys/file.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#define MAP_READ 0
|
|
||||||
--- a/mdadm.c
|
|
||||||
+++ b/mdadm.c
|
|
||||||
@@ -28,6 +28,7 @@
|
|
||||||
#include "mdadm.h"
|
|
||||||
#include "md_p.h"
|
|
||||||
#include <ctype.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
|
|
||||||
static int scan_assemble(struct supertype *ss,
|
|
||||||
struct context *c,
|
|
||||||
--- a/mdopen.c
|
|
||||||
+++ b/mdopen.c
|
|
||||||
@@ -25,6 +25,7 @@
|
|
||||||
#include "mdadm.h"
|
|
||||||
#include "md_p.h"
|
|
||||||
#include <ctype.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
|
|
||||||
void make_parts(char *dev, int cnt)
|
|
||||||
{
|
|
||||||
--- a/platform-intel.c
|
|
||||||
+++ b/platform-intel.c
|
|
||||||
@@ -28,6 +28,7 @@
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
static int devpath_to_ll(const char *dev_path, const char *entry,
|
|
||||||
--- a/policy.c
|
|
||||||
+++ b/policy.c
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
#include <dirent.h>
|
|
||||||
#include <fnmatch.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
#include "dlink.h"
|
|
||||||
/*
|
|
||||||
* Policy module for mdadm.
|
|
||||||
--- a/super-ddf.c
|
|
||||||
+++ b/super-ddf.c
|
|
||||||
@@ -31,6 +31,7 @@
|
|
||||||
#include "sha1.h"
|
|
||||||
#include <values.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
|
|
||||||
/* a non-official T10 name for creation GUIDs */
|
|
||||||
static char T10[] = "Linux-MD";
|
|
||||||
--- a/super-intel.c
|
|
||||||
+++ b/super-intel.c
|
|
||||||
@@ -24,6 +24,7 @@
|
|
||||||
#include "platform-intel.h"
|
|
||||||
#include <values.h>
|
|
||||||
#include <scsi/sg.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <dirent.h>
|
|
||||||
|
|
||||||
--- a/sysfs.c
|
|
||||||
+++ b/sysfs.c
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
#include "mdadm.h"
|
|
||||||
#include <dirent.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
|
|
||||||
#define MAX_SYSFS_PATH_LEN 120
|
|
||||||
|
|
||||||
--- a/util.c
|
|
||||||
+++ b/util.c
|
|
||||||
@@ -29,6 +29,7 @@
|
|
||||||
#include <sys/wait.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
#include <sys/resource.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
#include <sys/vfs.h>
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#include <linux/magic.h>
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/Incremental.c
|
--- a/Incremental.c
|
||||||
+++ b/Incremental.c
|
+++ b/Incremental.c
|
||||||
@@ -1620,6 +1620,10 @@ static int Incremental_container(struct
|
@@ -1619,6 +1619,10 @@ static int Incremental_container(struct
|
||||||
if (ra_all == ra_blocked)
|
if (ra_all == ra_blocked)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -13,7 +13,7 @@
|
|||||||
memcpy(suuid, uuid_zero, sizeof(int[4]));
|
memcpy(suuid, uuid_zero, sizeof(int[4]));
|
||||||
--- a/util.c
|
--- a/util.c
|
||||||
+++ b/util.c
|
+++ b/util.c
|
||||||
@@ -1221,7 +1221,9 @@ void wait_for(char *dev, int fd)
|
@@ -1220,7 +1220,9 @@ void wait_for(char *dev, int fd)
|
||||||
struct superswitch *superlist[] =
|
struct superswitch *superlist[] =
|
||||||
{
|
{
|
||||||
&super0, &super1,
|
&super0, &super1,
|
||||||
|
Loading…
Reference in New Issue
Block a user