aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-iscsi/musl-fixes.patch
blob: 5a3158e5df50f3571fe6d58adac50e6030044c41 (plain) (blame)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
diff --git a/iscsiuio/src/unix/libs/bnx2x.c b/iscsiuio/src/unix/libs/bnx2x.c
index 19cbcec..ad2d6ba 100644
--- a/iscsiuio/src/unix/libs/bnx2x.c
+++ b/iscsiuio/src/unix/libs/bnx2x.c
@@ -36,6 +36,7 @@
  * bnx2x.c - bnx2x user space driver
  *
  */
+#include <netinet/if_ether.h>
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/usr/idbm.c b/usr/idbm.c
index 3b8a5a2..579b145 100644
--- a/usr/idbm.c
+++ b/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>
diff --git a/usr/iscsi_net_util.c b/usr/iscsi_net_util.c
index 06df9b3..777e4e2 100644
--- a/usr/iscsi_net_util.c
+++ b/usr/iscsi_net_util.c
@@ -30,7 +30,7 @@
 #include <linux/sockios.h>
 #include <linux/if_vlan.h>
 #include <net/if_arp.h>
-#include <linux/if_ether.h>
+#include <netinet/if_ether.h>

 #include "sysdeps.h"
 #include "ethtool-copy.h"
diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
index 9602f6c..ba6e873 100644
--- a/usr/iscsiadm.c
+++ b/usr/iscsiadm.c
@@ -3263,6 +3263,7 @@ main(int argc, char **argv)
 	int packet_size=32, ping_count=1, ping_interval=0;
 	int do_discover = 0, sub_mode = -1;
 	int portal_type = -1;
+	int argerror = 0;
 	struct sigaction sa_old;
 	struct sigaction sa_new;
 	struct list_head ifaces;
@@ -3426,6 +3427,11 @@ main(int argc, char **argv)
 			break;
 		case 'h':
 			usage(0);
+			break;
+		case '?':
+			log_error("unrecognized character '%c'", optopt);
+			argerror = 1;
+			break;
 		}
 
 		if (name && value) {
@@ -3441,8 +3447,7 @@ main(int argc, char **argv)
 		}
 	}
 
-	if (optopt) {
-		log_error("unrecognized character '%c'", optopt);
+	if (argerror) {
 		rc = ISCSI_ERR_INVAL;
 		goto free_ifaces;
 	}
diff --git a/utils/fwparam_ibft/fwparam_ppc.c b/utils/fwparam_ibft/fwparam_ppc.c
index c298b8c..da14ee2 100644
--- a/utils/fwparam_ibft/fwparam_ppc.c
+++ b/utils/fwparam_ibft/fwparam_ppc.c
@@ -356,7 +356,7 @@ static int loop_devs(const char *devtree)
 	 * 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;
--
2.13.0