diff options
| -rw-r--r-- | meta-networking/recipes-daemons/ippool/ippool/0001-Use-unsigned-int-type-for-1-bit-integer-bitfield.patch | 42 | ||||
| -rw-r--r-- | meta-networking/recipes-daemons/ippool/ippool_1.3.bb | 1 |
2 files changed, 43 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/ippool/ippool/0001-Use-unsigned-int-type-for-1-bit-integer-bitfield.patch b/meta-networking/recipes-daemons/ippool/ippool/0001-Use-unsigned-int-type-for-1-bit-integer-bitfield.patch new file mode 100644 index 0000000000..0533616722 --- /dev/null +++ b/meta-networking/recipes-daemons/ippool/ippool/0001-Use-unsigned-int-type-for-1-bit-integer-bitfield.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | From 4788ce6ec602f6441970e1095572c4ff0e90c7c5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 17 Jan 2023 22:33:52 -0800 | ||
| 4 | Subject: [PATCH] Use unsigned int type for 1-bit integer bitfield | ||
| 5 | |||
| 6 | In C++, signed integers are represented in two's complement. This also applies to signed bitfields. | ||
| 7 | A signed bitfield composed of one bit can therefore store a value in the range -1 to 0. | ||
| 8 | Assigning a value of 1 to such a bitfield should produce a warning since it is out of range of representable values. | ||
| 9 | Therefore fix this case by using unsigned int instead of signed int | ||
| 10 | |||
| 11 | Upstream-Status: Pending | ||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | usl/usl_signal.c | 12 ++++++------ | ||
| 15 | 1 file changed, 6 insertions(+), 6 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/usl/usl_signal.c b/usl/usl_signal.c | ||
| 18 | index 45ddd94..8c1d4d0 100644 | ||
| 19 | --- a/usl/usl_signal.c | ||
| 20 | +++ b/usl/usl_signal.c | ||
| 21 | @@ -39,12 +39,12 @@ struct usl_notifier { | ||
| 22 | }; | ||
| 23 | |||
| 24 | typedef struct { | ||
| 25 | - volatile int sighup:1; | ||
| 26 | - volatile int sigterm:1; | ||
| 27 | - volatile int sigchld:1; | ||
| 28 | - volatile int sigusr1:1; | ||
| 29 | - volatile int sigusr2:1; | ||
| 30 | - volatile int running:1; | ||
| 31 | + volatile unsigned int sighup:1; | ||
| 32 | + volatile unsigned int sigterm:1; | ||
| 33 | + volatile unsigned int sigchld:1; | ||
| 34 | + volatile unsigned int sigusr1:1; | ||
| 35 | + volatile unsigned int sigusr2:1; | ||
| 36 | + volatile unsigned int running:1; | ||
| 37 | sig_atomic_t waiting; | ||
| 38 | sigjmp_buf sigjmp; | ||
| 39 | } usl_signal_data_t; | ||
| 40 | -- | ||
| 41 | 2.39.1 | ||
| 42 | |||
diff --git a/meta-networking/recipes-daemons/ippool/ippool_1.3.bb b/meta-networking/recipes-daemons/ippool/ippool_1.3.bb index 984acac76e..26b03814d6 100644 --- a/meta-networking/recipes-daemons/ippool/ippool_1.3.bb +++ b/meta-networking/recipes-daemons/ippool/ippool_1.3.bb | |||
| @@ -29,6 +29,7 @@ SRC_URI = "https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-$ | |||
| 29 | file://strncpy-truncation.patch \ | 29 | file://strncpy-truncation.patch \ |
| 30 | file://0001-pppd-ippool.c-Fix-type-casting-issues-between-in_add.patch \ | 30 | file://0001-pppd-ippool.c-Fix-type-casting-issues-between-in_add.patch \ |
| 31 | file://0002-ippool_rpc_server.c-Add-missing-prototype-for-ippool.patch \ | 31 | file://0002-ippool_rpc_server.c-Add-missing-prototype-for-ippool.patch \ |
| 32 | file://0001-Use-unsigned-int-type-for-1-bit-integer-bitfield.patch \ | ||
| 32 | " | 33 | " |
| 33 | 34 | ||
| 34 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4c59283b82fc2b166455e0fc23c71c6f" | 35 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4c59283b82fc2b166455e0fc23c71c6f" |
