--- ./utils/open-isns/isns.h.orig +++ ./utils/open-isns/isns.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #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 #include #include +#include #include #include #include --- ./usr/iscsiadm.c.orig +++ ./usr/iscsiadm.c @@ -2553,7 +2553,10 @@ main(int argc, char **argv) return 0; case 'h': usage(0); - } + + case '?': + log_error("unrecognized character '%c'", optopt); + } if (name && value) { param = idbm_alloc_user_param(name, value); @@ -2568,8 +2571,7 @@ main(int argc, char **argv) } } - if (optopt) { - log_error("unrecognized character '%c'", optopt); + if (opterr) { rc = ISCSI_ERR_INVAL; goto free_ifaces; }