summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>2022-10-21 00:14:18 +0200
committerMaciej S. Szmigiero <mail@maciej.szmigiero.name>2022-10-21 00:35:13 +0200
commit81a89385a45d3de1028bcd86b3688fb465b4035c (patch)
treec48f463d39f563a60158ed8a31342c8e81ef07ec
parentc2e48aa9c29cff92bda60607266dbe4da10b95fd (diff)
downloadupower-81a89385a45d3de1028bcd86b3688fb465b4035c.tar.gz
enumerator-udev: actually check for an idevice
up-enumerator-udev.c forgot to include the build config file, resulting in HAVE_IDEVICE macro always being undefined. This meant that the idevice backend was never actually instantiated - as evidenced by the file not even compiling when this was fixed, due to missing "up-device-idevice.h" include. Fix both of these issues.
-rw-r--r--src/linux/up-enumerator-udev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/linux/up-enumerator-udev.c b/src/linux/up-enumerator-udev.c
index 9e52d15..1182bdf 100644
--- a/src/linux/up-enumerator-udev.c
+++ b/src/linux/up-enumerator-udev.c
@@ -18,6 +18,8 @@
*
*/
+#include "config.h"
+
#include <string.h>
#include <gudev/gudev.h>
@@ -29,6 +31,9 @@
#include "up-device-supply-battery.h"
#include "up-device-hid.h"
#include "up-device-wup.h"
+#ifdef HAVE_IDEVICE
+#include "up-device-idevice.h"
+#endif /* HAVE_IDEVICE */
struct _UpEnumeratorUdev {
UpEnumerator parent;