summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/libacpi/files/0001-libacpi-Fix-build-witth-fno-commom.patch
blob: 32808fb92a2ba3cff4722bd89e6ed2a58d13abeb (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
From 9839c169f513e65fc711646257b3e8588cce623c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 5 Aug 2020 12:06:01 -0700
Subject: [PATCH] libacpi: Fix build witth -fno-commom

Upstream-Status: Pending

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 libacpi.c | 16 ++++++++++++++++
 libacpi.h |  6 +++---
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/libacpi.c b/libacpi.c
index 4e34725..9344ea4 100644
--- a/libacpi.c
+++ b/libacpi.c
@@ -14,6 +14,22 @@
 #include "libacpi.h"
 #include "list.h"
 
+/**
+ * Array for existing batteries, loop until
+ * globals->battery_count
+ */
+battery_t batteries[MAX_ITEMS];
+/**
+ * Array for existing thermal zones, loop until
+ * globals->thermal_count
+ */
+thermal_t thermals[MAX_ITEMS];
+/**
+ * Array for existing fans, loop until
+ * globals->fan_count
+ */
+fan_t fans[MAX_ITEMS];
+
 static int read_acpi_battinfo(const int num);
 static int read_acpi_battalarm(const int num);
 static int read_acpi_battstate(const int num);
diff --git a/libacpi.h b/libacpi.h
index 9334b79..5242d3d 100644
--- a/libacpi.h
+++ b/libacpi.h
@@ -183,17 +183,17 @@ typedef struct {
  * Array for existing batteries, loop until
  * globals->battery_count
  */
-battery_t batteries[MAX_ITEMS];
+extern battery_t batteries[MAX_ITEMS];
 /**
  * Array for existing thermal zones, loop until
  * globals->thermal_count
  */
-thermal_t thermals[MAX_ITEMS];
+extern thermal_t thermals[MAX_ITEMS];
 /**
  * Array for existing fans, loop until
  * globals->fan_count
  */
-fan_t fans[MAX_ITEMS];
+extern fan_t fans[MAX_ITEMS];
 /**
  * Finds existing batteries and fills the
  * corresponding batteries structures with the paths
-- 
2.28.0