packages/libs/libudev-fbsd/patches/002-replace-nitems.patch
Daniel Golle 158e0922a1 libudev-fbsd: add package
This package provides a small udev shim originally intended for
FreeBSD/devd, but it works well for our non-systemd-environment as
well. It has limited features, but it's enough to detect and
enumerate input devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-06-19 01:33:32 +02:00

11 lines
348 B
Diff

--- a/src/libudev.c
+++ b/src/libudev.c
@@ -175,7 +175,7 @@ populate_properties_list(struct udev_dev
struct udev_list_entry **list_end = &udev_device->properties_list;
- for (unsigned i = 0; i < nitems(ids); ++i) {
+ for (unsigned i = 0; i < (sizeof(ids) / sizeof(ids[0])); ++i) {
char const *id = ids[i];
struct udev_list_entry *le;