summaryrefslogtreecommitdiff
path: root/sys-block/open-iscsi/files/musl-fixes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sys-block/open-iscsi/files/musl-fixes.patch')
-rw-r--r--sys-block/open-iscsi/files/musl-fixes.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/sys-block/open-iscsi/files/musl-fixes.patch b/sys-block/open-iscsi/files/musl-fixes.patch
new file mode 100644
index 000000000000..f101eda6ddeb
--- /dev/null
+++ b/sys-block/open-iscsi/files/musl-fixes.patch
@@ -0,0 +1,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;
+