open-iscsi-2.0.874-musl-fixes.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --- ./utils/fwparam_ibft/fwparam_ppc.c 2016-09-29 13:33:24.000000000 -0500
  2. +++ ./utils/fwparam_ibft/fwparam_ppc.c 2017-01-02 11:37:32.738351217 -0600
  3. @@ -356,7 +356,7 @@
  4. * Sort the nics into "natural" order. The proc fs
  5. * device-tree has them in somewhat random, or reversed order.
  6. */
  7. - qsort(niclist, nic_count, sizeof(char *), (__compar_fn_t)nic_cmp);
  8. + qsort(niclist, nic_count, sizeof(char *), (int (*)(const void *, const void *))nic_cmp);
  9. snprintf(prefix, sizeof(prefix), "%s/%s", devtree, "aliases");
  10. dev_count = 0;
  11. --- ./usr/idbm.c.orig
  12. +++ ./usr/idbm.c
  13. @@ -25,6 +25,7 @@
  14. #include <stdlib.h>
  15. #include <string.h>
  16. #include <errno.h>
  17. +#include <fcntl.h>
  18. #include <dirent.h>
  19. #include <limits.h>
  20. #include <sys/stat.h>
  21. --- a/usr/iscsiadm.c 2016-09-29 13:33:24.000000000 -0500
  22. +++ b/usr/iscsiadm.c 2017-01-02 11:46:37.643506953 -0600
  23. @@ -3262,6 +3262,7 @@
  24. int tpgt = PORTAL_GROUP_TAG_UNKNOWN, killiscsid=-1, do_show=0;
  25. int packet_size=32, ping_count=1, ping_interval=0;
  26. int do_discover = 0, sub_mode = -1;
  27. + int argerror = 0;
  28. int portal_type = -1;
  29. struct sigaction sa_old;
  30. struct sigaction sa_new;
  31. @@ -3426,6 +3427,9 @@
  32. break;
  33. case 'h':
  34. usage(0);
  35. + case '?':
  36. + log_error("unrecognized character '%c'", optopt);
  37. + argerror = 1;
  38. }
  39. if (name && value) {
  40. @@ -3441,8 +3445,7 @@
  41. }
  42. }
  43. - if (optopt) {
  44. - log_error("unrecognized character '%c'", optopt);
  45. + if (argerror) {
  46. rc = ISCSI_ERR_INVAL;
  47. goto free_ifaces;
  48. }