diff options
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files')
2 files changed, 79 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Makefile-Do-not-set-Werror.patch b/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Makefile-Do-not-set-Werror.patch new file mode 100644 index 000000000..d5e0deb89 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Makefile-Do-not-set-Werror.patch @@ -0,0 +1,31 @@ +From 31d88f46bfc67de2659991674253a5d5dfb92afc Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 12 Aug 2020 12:00:29 -0700 +Subject: [PATCH] Makefile: Do not set -Werror + +clang finds more warnings which causes build to fail, disable treating +warning as errors + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + usr/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/Makefile b/usr/Makefile +index 21bb154..0018605 100644 +--- a/usr/Makefile ++++ b/usr/Makefile +@@ -35,7 +35,7 @@ endif + PKG_CONFIG = /usr/bin/pkg-config + + CFLAGS ?= -O2 -g +-WARNFLAGS ?= -Wall -Wextra -Werror -Wstrict-prototypes -fno-common ++WARNFLAGS ?= -Wall -Wextra -Wstrict-prototypes -fno-common + CFLAGS += $(WARNFLAGS) -I../include -I. -D_GNU_SOURCE \ + -I$(TOPDIR)/libopeniscsiusr + CFLAGS += $(shell $(PKG_CONFIG) --cflags libkmod) +-- +2.28.0 + diff --git a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Compare-with-max-int-instead-of-max-.patch b/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Compare-with-max-int-instead-of-max-.patch new file mode 100644 index 000000000..c71f01299 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Compare-with-max-int-instead-of-max-.patch @@ -0,0 +1,48 @@ +From 7bdaa32c80bb7d37668c1ff6d88bb02428459a0f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 21 Oct 2020 09:11:20 -0700 +Subject: [PATCH] libopeniscsiusr: Compare with max int instead of max long + +This compares value member of int_list_tbl struct which is of unsigned +int type. + +struct int_list_tbl { +const char *name; +unsigned int value; +}; + +Clang compiler reports this comparison when +-Wtautological-constant-out-of-range-compare is enabled + +| idbm.c:1042:2: error: result of comparison of constant 18446744073709551615 with expression of type 'unsigned int' is always true [-Werror,-Wtautological-constant-out-of-range-compare] +| _rec_int_list(SESSION_CHAP_ALGS, recs, node, session.auth.chap_algs, +| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +| idbm.c:263:23: note: expanded from macro '_rec_int_list' +| if (_org->_name[_i] != ~0UL) { \ +| ~~~~~~~~~~~~~~~ ^ ~~~~ + +Since max value for int can be less than unsinged long e.g. on LP64 its +better to use UINT_MAX here + +Upstream-Status: Submitted [https://github.com/open-iscsi/open-iscsi/pull/227] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libopeniscsiusr/idbm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libopeniscsiusr/idbm.c b/libopeniscsiusr/idbm.c +index 7bc2381..060196f 100644 +--- a/libopeniscsiusr/idbm.c ++++ b/libopeniscsiusr/idbm.c +@@ -260,7 +260,7 @@ do {\ + _recs[_n].type = TYPE_INT_LIST; \ + _strncpy(_recs[_n].name, _key, NAME_MAXVAL); \ + for (unsigned int _i = 0; _i < ARRAY_LEN(_org->_name); _i++) { \ +- if (_org->_name[_i] != ~0UL) { \ ++ if (_org->_name[_i] != UINT_MAX) { \ + for (unsigned int _j = 0; _j < ARRAY_LEN(_tbl); _j++) { \ + if (_tbl[_j].value == _org->_name[_i]) { \ + strcat(_recs[_n].value, _tbl[_j].name); \ +-- +2.29.0 + |