aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-iscsi/musl-fixes.patch
blob: f101eda6ddeb8e70bd587c6474b7b3796d7d00af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
--- ./utils/open-isns/isns.h.orig
+++ ./utils/open-isns/isns.h
@@ -13,6 +13,7 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <stdio.h>
+#include <time.h>
 
 #include <isns-proto.h>
 #include "types.h"
--- ./utils/fwparam_ibft/fwparam_ppc.c.orig
+++ ./utils/fwparam_ibft/fwparam_ppc.c
@@ -356,7 +356,7 @@
 	 * Sort the nics into "natural" order.	The proc fs
 	 * device-tree has them in somewhat random, or reversed order.
 	 */
-	qsort(niclist, nic_count, sizeof(char *), (__compar_fn_t)nic_cmp);
+	qsort(niclist, nic_count, sizeof(char *), (int (*)(const void *, const void *))nic_cmp);
 
 	snprintf(prefix, sizeof(prefix), "%s/%s", devtree, "aliases");
 	dev_count = 0;
--- ./usr/idbm.c.orig
+++ ./usr/idbm.c
@@ -25,6 +25,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
+#include <fcntl.h>
 #include <dirent.h>
 #include <limits.h>
 #include <sys/stat.h>
--- ./usr/iscsiadm.c.orig	2012-05-21 02:59:24.000000000 +0200
+++ ./usr/iscsiadm.c	2016-07-20 22:00:54.430451701 +0200
@@ -2403,6 +2403,7 @@ main(int argc, char **argv)
 	int tpgt = PORTAL_GROUP_TAG_UNKNOWN, killiscsid=-1, do_show=0;
 	int packet_size=32, ping_count=1, ping_interval=0;
 	int do_discover = 0, sub_mode = -1;
+	int argerror = 0;
 	struct sigaction sa_old;
 	struct sigaction sa_new;
 	struct list_head ifaces;
@@ -2553,7 +2554,11 @@ main(int argc, char **argv)
 			return 0;
 		case 'h':
 			usage(0);
-		}
+
+		case '?':
+			log_error("unrecognized character '%c'", optopt);
+			argerror = 1;
+		}	
 
 		if (name && value) {
 			param = idbm_alloc_user_param(name, value);
@@ -2568,8 +2573,7 @@ main(int argc, char **argv)
 		}
 	}
 
-	if (optopt) {
-		log_error("unrecognized character '%c'", optopt);
+	if (argerror) {
 		rc = ISCSI_ERR_INVAL;
 		goto free_ifaces;