summaryrefslogtreecommitdiffstats
path: root/source/a/upower/81a89385a45d3de1028bcd86b3688fb465b4035c.patch
blob: ff80079ea94075e0efcb652a0964f91da65ce655 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 81a89385a45d3de1028bcd86b3688fb465b4035c Mon Sep 17 00:00:00 2001
From: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Date: Fri, 21 Oct 2022 00:14:18 +0200
Subject: [PATCH] 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.
---
 src/linux/up-enumerator-udev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/linux/up-enumerator-udev.c b/src/linux/up-enumerator-udev.c
index 9e52d153..1182bdfd 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;
-- 
GitLab