Add typecasting patches for usb IDs

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This commit is contained in:
Patrick Uiterwijk 2018-02-22 12:44:31 +01:00
parent 6f5e81a1a0
commit a88494686e
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,26 @@
From 68b2813a0b6dcf8ff8f8eb36aa225ae90661e67e Mon Sep 17 00:00:00 2001
From: Fedora systemd team <systemd-maint@redhat.com>
Date: Thu, 22 Feb 2018 12:45:31 +0100
Subject: [PATCH] Typecast USB IDs
Signed-off-by: Fedora systemd team <systemd-maint@redhat.com>
---
src/udev/udev-builtin-hwdb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c
index ca7f7c2..d3556e4 100644
--- a/src/udev/udev-builtin-hwdb.c
+++ b/src/udev/udev-builtin-hwdb.c
@@ -77,7 +77,7 @@ static const char *modalias_usb(struct udev_device *dev, char *s, size_t size) {
pn = strtol(p, NULL, 16);
if (pn <= 0)
return NULL;
- snprintf(s, size, "usb:v%04Xp%04X*", vn, pn);
+ snprintf(s, size, "usb:v%04Xp%04X*", (uint16_t)vn, (uint16_t)pn);
return s;
}
--
2.16.2

View File

@ -48,6 +48,8 @@ i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done|
GIT_DIR=../../src/systemd/.git git diffab -M v233..master@{2017-06-15} -- hwdb/[67]* hwdb/parse_hwdb.py > hwdb.patch
%endif
Patch1: systemd-typecast-usbids.patch
Patch0998: 0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch
%global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);}
@ -709,6 +711,7 @@ fi
%changelog
* Thu Feb 22 2018 Patrick Uiterwijk <patrick@puiterwijk.org> - 237-4.git84c8da5
- Add coreutils dep for systemd-libs %post
- Add patch to typecast USB IDs to avoid compile failure
* Wed Feb 21 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 237-3.git84c8da5
- Update some patches for test skipping that were updated upstream