Remove dependency on libudev.h

libudev is linked explicitly and only a few structures need to be declared which are passed as pointers to the dynamically loaded functions. No need to require libudev-dev on the build machines.
This commit is contained in:
tamasmeszaros 2020-10-26 14:23:44 +01:00
parent e6e3e98fd5
commit a5ba1534b3

View File

@ -42,10 +42,16 @@
#include <linux/hidraw.h>
#include <linux/version.h>
#include <linux/input.h>
#include <libudev.h>
#include "hidapi.h"
// Declare udev structures needed in this module. They are passed by pointers
// to udev functions and not used directly.
struct udev_device;
struct udev_list_entry;
struct udev_enumerate;
struct udev;
typedef const char* (*hid_wrapper_udev_device_get_devnode_type)(struct udev_device *udev_device);
typedef struct udev_device* (*hid_wrapper_udev_device_get_parent_with_subsystem_devtype_type)(struct udev_device *udev_device, const char *subsystem, const char *devtype);
typedef const char* (*hid_wrapper_udev_device_get_sysattr_value_type)(struct udev_device *udev_device, const char *sysattr);