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
+++ /dev/null
---- 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(
+++ /dev/null
---- 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;
-
--- 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 -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 <fcntl.h>
- #include <unistd.h>
+--- a/src/libudev.h
++++ b/src/libudev.h
+@@ -7,6 +7,11 @@
+ extern "C" {
+ #endif
+
+#ifdef __cplusplus
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
--- 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 *
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);
--- 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];
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;
}
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)
{
--- 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);
--- 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);
{
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;
}
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);