diff options
| author | Yogesh Tyagi <yogesh.tyagi@intel.com> | 2026-02-06 00:09:16 +0800 |
|---|---|---|
| committer | Yogesh Tyagi <yogesh.tyagi@intel.com> | 2026-02-06 00:12:44 +0800 |
| commit | 7535d8443247894f24bc6189a55234dcef09d5f8 (patch) | |
| tree | fb8415516cd9b453c69e90d450350542e4fb17f1 | |
| parent | f1b157912ccebfa5fd625321fd63a1781b586845 (diff) | |
| download | meta-intel-7535d8443247894f24bc6189a55234dcef09d5f8.tar.gz | |
metee: Fix build failure with musl libc
Add patch to fix sign-conversion warnings with musl ioctl macros.
musl's ioctl request macros expand to unsigned long values, causing
sign-conversion warnings when passed to ioctl() which expects an int.
Cast the macros explicitly to int in three ioctl calls:
- IOCTL_MEI_CONNECT_CLIENT
- IOCTL_MEI_CONNECT_CLIENT_VTAG
- IOCTL_MEI_NOTIFY_GET
Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
| -rw-r--r-- | recipes-support/metee/metee/0001-Fix-sign-conversion-warnings-with-musl-ioctl.patch | 48 | ||||
| -rw-r--r-- | recipes-support/metee/metee_6.0.2.bb | 1 |
2 files changed, 49 insertions, 0 deletions
diff --git a/recipes-support/metee/metee/0001-Fix-sign-conversion-warnings-with-musl-ioctl.patch b/recipes-support/metee/metee/0001-Fix-sign-conversion-warnings-with-musl-ioctl.patch new file mode 100644 index 00000000..4ffa748b --- /dev/null +++ b/recipes-support/metee/metee/0001-Fix-sign-conversion-warnings-with-musl-ioctl.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
| 3 | Date: Thu, 6 Feb 2026 00:05:37 +0800 | ||
| 4 | Subject: [PATCH] Fix sign-conversion warnings with musl ioctl | ||
| 5 | |||
| 6 | musl's ioctl request macros expand to unsigned long values, causing | ||
| 7 | sign-conversion warnings when passed to ioctl() which expects an int. | ||
| 8 | Cast the macros explicitly to int to resolve this. | ||
| 9 | |||
| 10 | Upstream-Status: Submitted [https://github.com/intel/metee/pull/22] | ||
| 11 | Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
| 12 | --- | ||
| 13 | src/linux/mei.c | 6 +++--- | ||
| 14 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/src/linux/mei.c b/src/linux/mei.c | ||
| 17 | index 1111111..2222222 100644 | ||
| 18 | --- a/src/linux/mei.c | ||
| 19 | +++ b/src/linux/mei.c | ||
| 20 | @@ -193,7 +193,7 @@ static inline int __mei_connect(struct mei *me, struct mei_connect_client_data | ||
| 21 | int rc; | ||
| 22 | |||
| 23 | errno = 0; | ||
| 24 | - rc = ioctl(me->fd, IOCTL_MEI_CONNECT_CLIENT, d); | ||
| 25 | + rc = ioctl(me->fd, (int)IOCTL_MEI_CONNECT_CLIENT, d); | ||
| 26 | me->last_err = errno; | ||
| 27 | return rc == -1 ? -me->last_err : 0; | ||
| 28 | } | ||
| 29 | @@ -204,7 +204,7 @@ static inline int __mei_connect_vtag(struct mei *me, | ||
| 30 | int rc; | ||
| 31 | |||
| 32 | errno = 0; | ||
| 33 | - rc = ioctl(me->fd, IOCTL_MEI_CONNECT_CLIENT_VTAG, d); | ||
| 34 | + rc = ioctl(me->fd, (int)IOCTL_MEI_CONNECT_CLIENT_VTAG, d); | ||
| 35 | me->last_err = errno; | ||
| 36 | return rc == -1 ? -me->last_err : 0; | ||
| 37 | } | ||
| 38 | @@ -225,7 +225,7 @@ static inline int __mei_notify_get(struct mei *me) | ||
| 39 | int rc; | ||
| 40 | |||
| 41 | errno = 0; | ||
| 42 | - rc = ioctl(me->fd, IOCTL_MEI_NOTIFY_GET, ¬ification); | ||
| 43 | + rc = ioctl(me->fd, (int)IOCTL_MEI_NOTIFY_GET, ¬ification); | ||
| 44 | me->last_err = errno; | ||
| 45 | return rc == -1 ? -me->last_err : 0; | ||
| 46 | } | ||
| 47 | -- | ||
| 48 | 2.43.0 | ||
diff --git a/recipes-support/metee/metee_6.0.2.bb b/recipes-support/metee/metee_6.0.2.bb index 01107619..64189172 100644 --- a/recipes-support/metee/metee_6.0.2.bb +++ b/recipes-support/metee/metee_6.0.2.bb | |||
| @@ -11,6 +11,7 @@ COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | |||
| 11 | inherit cmake | 11 | inherit cmake |
| 12 | 12 | ||
| 13 | SRC_URI = "git://github.com/intel/metee.git;branch=master;protocol=https \ | 13 | SRC_URI = "git://github.com/intel/metee.git;branch=master;protocol=https \ |
| 14 | file://0001-Fix-sign-conversion-warnings-with-musl-ioctl.patch \ | ||
| 14 | " | 15 | " |
| 15 | SRCREV = "93784f62070b2bc4e84b51e23c9add61f7600444" | 16 | SRCREV = "93784f62070b2bc4e84b51e23c9add61f7600444" |
| 16 | 17 | ||
