musl-fixes.patch 1.7 KB

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