From 58f1de60f87cc9d81934749d020aa69b83d3bee9 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 8 Feb 2019 21:59:50 +0100 Subject: [PATCH] libudev-fbsd: update to git source as of 2017-12-16 Remove patches 001-fix-unused.patch and 002-replace-nitems.patch, similar fixes to make libudev-fbsd compile were applied upstream. Refresh remaining patches. Signed-off-by: Daniel Golle --- libs/libudev-fbsd/Makefile | 8 ++-- .../libudev-fbsd/patches/001-fix-unused.patch | 42 ------------------- .../patches/002-replace-nitems.patch | 11 ----- .../003-add-pkg-config-description.patch | 2 +- libs/libudev-fbsd/patches/005-extern-c.patch | 23 +++++----- .../100-add-stub-udev_device_get_driver.patch | 4 +- ...ev_device_new_from_subsystem_sysname.patch | 8 ++-- ...b-udev_enumerate_add_nomatch_sysattr.patch | 6 +-- 8 files changed, 26 insertions(+), 78 deletions(-) delete mode 100644 libs/libudev-fbsd/patches/001-fix-unused.patch delete mode 100644 libs/libudev-fbsd/patches/002-replace-nitems.patch diff --git a/libs/libudev-fbsd/Makefile b/libs/libudev-fbsd/Makefile index 07263f133..af9f278b2 100644 --- a/libs/libudev-fbsd/Makefile +++ b/libs/libudev-fbsd/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libudev-fbsd -PKG_RELEASE:=2 -PKG_VERSION:=20160820 -PKG_SOURCE_VERSION:=1f21323b817e70253d3c04bc8bedd61c477d0544 +PKG_RELEASE:=1 +PKG_VERSION:=20171216 +PKG_SOURCE_VERSION:=fa190fdf0b22a41b5f42e3a722f754c08ad7b337 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz -PKG_MIRROR_HASH:=cc885851c97dcaef65d7f4fb0899ed1a01412b02e44851476ac47ce4da024d0b +PKG_MIRROR_HASH:=d4638099fd288a293a165304541eb9c01e828bb358a0091caa02c1327c20964b PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/jiixyj/libudev-fbsd.git diff --git a/libs/libudev-fbsd/patches/001-fix-unused.patch b/libs/libudev-fbsd/patches/001-fix-unused.patch deleted file mode 100644 index 194943360..000000000 --- a/libs/libudev-fbsd/patches/001-fix-unused.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/src/libudev.c -+++ b/src/libudev.c -@@ -354,7 +354,7 @@ udev_device_get_subsystem(struct udev_de - - const char * - udev_device_get_sysattr_value( -- struct udev_device *udev_device __unused, const char *sysattr) -+ __attribute__ ((unused))struct udev_device *udev_device, const char *sysattr) - { - (void)sysattr; - LOG("stub: udev_device_get_sysattr_value %s\n", sysattr); -@@ -469,7 +469,7 @@ udev_device_get_parent_with_subsystem_de - } - - struct udev_enumerate * --udev_enumerate_new(struct udev *udev __unused) -+udev_enumerate_new( __attribute__ ((unused))struct udev *udev) - { - LOG("udev_enumerate_new\n"); - struct udev_enumerate *u = calloc(1, sizeof(struct udev_enumerate)); -@@ -538,7 +538,7 @@ udev_enumerate_get_list_entry(struct ude - - int - udev_enumerate_add_match_sysname( -- struct udev_enumerate *udev_enumerate __unused, const char *sysname) -+ __attribute__ ((unused))struct udev_enumerate *udev_enumerate, const char *sysname) - { - (void)sysname; - LOG("stub: udev_enumerate_add_match_sysname %s\n", sysname); ---- a/src/libudev.h -+++ b/src/libudev.h -@@ -24,8 +24,8 @@ void udev_unref(struct udev *udev); - char const *udev_device_get_devnode(struct udev_device *udev_device); - dev_t udev_device_get_devnum(struct udev_device *udev_device); - char const *udev_device_get_property_value( -- struct udev_device *dummy __unused, char const *property); --struct udev *udev_device_get_udev(struct udev_device *dummy __unused); -+ __attribute__ ((unused))struct udev_device *dummy, char const *property); -+struct udev *udev_device_get_udev( __attribute__ ((unused))struct udev_device *dummy); - struct udev_device *udev_device_new_from_syspath( - struct udev *udev, char const *syspath); - struct udev_device *udev_device_new_from_devnum( diff --git a/libs/libudev-fbsd/patches/002-replace-nitems.patch b/libs/libudev-fbsd/patches/002-replace-nitems.patch deleted file mode 100644 index 7f4d0de82..000000000 --- a/libs/libudev-fbsd/patches/002-replace-nitems.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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; - diff --git a/libs/libudev-fbsd/patches/003-add-pkg-config-description.patch b/libs/libudev-fbsd/patches/003-add-pkg-config-description.patch index 9aec7b9b3..19efcb3c9 100644 --- a/libs/libudev-fbsd/patches/003-add-pkg-config-description.patch +++ b/libs/libudev-fbsd/patches/003-add-pkg-config-description.patch @@ -1,6 +1,6 @@ --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -11,6 +11,7 @@ install(TARGETS udev LIBRARY DESTINATION +@@ -26,6 +26,7 @@ install(TARGETS udev LIBRARY DESTINATION install(FILES libudev.h DESTINATION include) set(PKG_CONFIG_NAME libudev) diff --git a/libs/libudev-fbsd/patches/005-extern-c.patch b/libs/libudev-fbsd/patches/005-extern-c.patch index de3ae3524..1e77bf4c7 100644 --- a/libs/libudev-fbsd/patches/005-extern-c.patch +++ b/libs/libudev-fbsd/patches/005-extern-c.patch @@ -1,9 +1,8 @@ -diff -ruN libudev-fbsd-20160820/src/libudev.h libudev-fbsd-20160820.mod/src/libudev.h ---- libudev-fbsd-20160820/src/libudev.h 2017-11-17 16:46:56.705435146 +0100 -+++ libudev-fbsd-20160820.mod/src/libudev.h 2017-11-17 16:48:07.276021522 +0100 -@@ -11,6 +11,11 @@ - #include - #include +--- a/src/libudev.h ++++ b/src/libudev.h +@@ -7,6 +7,11 @@ + extern "C" { + #endif + +#ifdef __cplusplus @@ -13,12 +12,14 @@ diff -ruN libudev-fbsd-20160820/src/libudev.h libudev-fbsd-20160820.mod/src/libu struct udev; struct udev_device; struct udev_list_entry; -@@ -83,4 +88,8 @@ - struct udev_monitor *udev_monitor); - void udev_monitor_unref(struct udev_monitor *udev_monitor); +@@ -76,6 +81,10 @@ void udev_monitor_unref(struct udev_moni -+#ifdef __cplusplus -+} /* extern "C" */ + #ifdef __cplusplus + } /* extern "C" */ +#endif + ++#ifdef __cplusplus ++} /* extern "C" */ + #endif + #endif diff --git a/libs/libudev-fbsd/patches/100-add-stub-udev_device_get_driver.patch b/libs/libudev-fbsd/patches/100-add-stub-udev_device_get_driver.patch index aaa56f3cf..7592c8b69 100644 --- a/libs/libudev-fbsd/patches/100-add-stub-udev_device_get_driver.patch +++ b/libs/libudev-fbsd/patches/100-add-stub-udev_device_get_driver.patch @@ -1,6 +1,6 @@ --- a/src/libudev.c +++ b/src/libudev.c -@@ -130,6 +130,12 @@ udev_device_get_devnum(struct udev_devic +@@ -139,6 +139,12 @@ udev_device_get_devnum(struct udev_devic } char const * @@ -15,7 +15,7 @@ LOG("udev_device_get_property_value %s\n", property); --- a/src/libudev.h +++ b/src/libudev.h -@@ -30,6 +30,7 @@ struct udev_device *udev_device_new_from +@@ -31,6 +31,7 @@ struct udev_device *udev_device_new_from struct udev *udev, char const *syspath); struct udev_device *udev_device_new_from_devnum( struct udev *udev, char type, dev_t devnum); diff --git a/libs/libudev-fbsd/patches/101-add-stub-udev_device_new_from_subsystem_sysname.patch b/libs/libudev-fbsd/patches/101-add-stub-udev_device_new_from_subsystem_sysname.patch index bc12d66a6..47ed81ac2 100644 --- a/libs/libudev-fbsd/patches/101-add-stub-udev_device_new_from_subsystem_sysname.patch +++ b/libs/libudev-fbsd/patches/101-add-stub-udev_device_new_from_subsystem_sysname.patch @@ -1,6 +1,6 @@ --- a/src/libudev.c +++ b/src/libudev.c -@@ -26,6 +26,7 @@ struct udev_device { +@@ -35,6 +35,7 @@ struct udev_device { struct udev *udev; int refcount; char syspath[32]; @@ -8,7 +8,7 @@ dev_t devnum; char const *sysname; char const *action; -@@ -115,6 +116,29 @@ udev_device_new_from_devnum(struct udev +@@ -124,6 +125,29 @@ udev_device_new_from_devnum(struct udev return NULL; } @@ -38,7 +38,7 @@ char const * udev_device_get_devnode(struct udev_device *udev_device) { -@@ -132,6 +156,20 @@ udev_device_get_devnum(struct udev_devic +@@ -141,6 +165,20 @@ udev_device_get_devnum(struct udev_devic char const * udev_device_get_driver(struct udev_device *udev_device) { @@ -61,7 +61,7 @@ --- a/src/libudev.h +++ b/src/libudev.h -@@ -30,6 +30,8 @@ struct udev_device *udev_device_new_from +@@ -31,6 +31,8 @@ struct udev_device *udev_device_new_from struct udev *udev, char const *syspath); struct udev_device *udev_device_new_from_devnum( struct udev *udev, char type, dev_t devnum); diff --git a/libs/libudev-fbsd/patches/102-add-stub-udev_enumerate_add_nomatch_sysattr.patch b/libs/libudev-fbsd/patches/102-add-stub-udev_enumerate_add_nomatch_sysattr.patch index 86e6b96cd..f65a2e978 100644 --- a/libs/libudev-fbsd/patches/102-add-stub-udev_enumerate_add_nomatch_sysattr.patch +++ b/libs/libudev-fbsd/patches/102-add-stub-udev_enumerate_add_nomatch_sysattr.patch @@ -1,6 +1,6 @@ --- a/src/libudev.c +++ b/src/libudev.c -@@ -162,7 +162,7 @@ udev_device_get_driver(struct udev_devic +@@ -171,7 +171,7 @@ udev_device_get_driver(struct udev_devic char driverlnk[32]; snprintf(driverlnp, sizeof(driverlnp), "%s/driver", udev_device->sysfspath); @@ -9,7 +9,7 @@ { char *drivernm; drivernm = strrchr(driverlnk, '/'); -@@ -600,6 +600,18 @@ udev_enumerate_add_match_property(struct +@@ -612,6 +612,18 @@ udev_enumerate_add_match_property(struct value); return -1; } @@ -30,7 +30,7 @@ udev_enumerate_unref(struct udev_enumerate *udev_enumerate) --- a/src/libudev.h +++ b/src/libudev.h -@@ -59,6 +59,8 @@ int udev_enumerate_add_match_sysname( +@@ -60,6 +60,8 @@ int udev_enumerate_add_match_sysname( struct udev_enumerate *udev_enumerate, char const *sysname); int udev_enumerate_add_match_property(struct udev_enumerate *udev_enumerate, char const *property, char const *value);