aboutsummaryrefslogtreecommitdiff
path: root/desktop/wmpower/wmpower-0.4.3-gcc-10.patch
blob: bdc28a16341ee8354faf9f3bb1968f6985b2eb7d (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
diff -Naur wmpower-0.4.3.orig/src/dockapp/dockapp.c wmpower-0.4.3/src/dockapp/dockapp.c
--- wmpower-0.4.3.orig/src/dockapp/dockapp.c	2003-09-18 18:53:27.000000000 +0200
+++ wmpower-0.4.3/src/dockapp/dockapp.c	2020-01-29 19:15:58.062434728 +0100
@@ -50,6 +50,7 @@
 GC         NormalGC;
 XpmIcon    wmgen;
 Pixmap     pixmask;
+Display    *display;
 
   /*****************/
  /* Mouse Regions */
diff -Naur wmpower-0.4.3.orig/src/dockapp/dockapp.h wmpower-0.4.3/src/dockapp/dockapp.h
--- wmpower-0.4.3.orig/src/dockapp/dockapp.h	2003-09-18 18:29:17.000000000 +0200
+++ wmpower-0.4.3/src/dockapp/dockapp.h	2020-01-29 19:15:58.062434728 +0100
@@ -28,7 +28,7 @@
  /* Global variable */
 /*******************/
 
-Display		*display;
+extern Display		*display;
 
   /***********************/
  /* Function Prototypes */
diff -Naur wmpower-0.4.3.orig/src/power_management/acpi/libacpi.c wmpower-0.4.3/src/power_management/acpi/libacpi.c
--- wmpower-0.4.3.orig/src/power_management/acpi/libacpi.c	2005-09-06 12:09:10.000000000 +0200
+++ wmpower-0.4.3/src/power_management/acpi/libacpi.c	2020-01-29 19:20:44.031452047 +0100
@@ -46,6 +46,8 @@
 #include "power_management.h"
 #include "lib_utils.h"
 
+char battery_type;
+int batt_count;
 
 /* here we put temp stuff read from proc files */
 char buf[512];
diff -Naur wmpower-0.4.3.orig/src/power_management/acpi/libacpi.h wmpower-0.4.3/src/power_management/acpi/libacpi.h
--- wmpower-0.4.3.orig/src/power_management/acpi/libacpi.h	2004-07-16 20:13:19.000000000 +0200
+++ wmpower-0.4.3/src/power_management/acpi/libacpi.h	2020-01-29 19:20:48.717452334 +0100
@@ -67,7 +67,7 @@
 }
 ACPIinfo;
 
-char battery_type;
+extern char battery_type;
 
 typedef struct
 {
@@ -76,7 +76,7 @@
 ACADstate;
 
 /* number of batteries detected */
-int batt_count;
+extern int batt_count;
 
 int  check_acpi (void);
 void read_acad_state (ACADstate *acadstate);
diff -Naur wmpower-0.4.3.orig/src/power_management/compal/compal_lib.c wmpower-0.4.3/src/power_management/compal/compal_lib.c
--- wmpower-0.4.3.orig/src/power_management/compal/compal_lib.c	2005-09-12 18:13:32.000000000 +0200
+++ wmpower-0.4.3/src/power_management/compal/compal_lib.c	2020-01-29 19:21:14.455453915 +0100
@@ -40,6 +40,7 @@
 #include "lib_utils.h"
 #include "power_management.h"
 
+char  compal_model[COMPAL_MAX_MODEL_INFO];
 
 
 /* gets a value from a strtok-ed buffer; for reading from /proc */
diff -Naur wmpower-0.4.3.orig/src/power_management/compal/compal_lib.h wmpower-0.4.3/src/power_management/compal/compal_lib.h
--- wmpower-0.4.3.orig/src/power_management/compal/compal_lib.h	2005-09-12 18:13:23.000000000 +0200
+++ wmpower-0.4.3/src/power_management/compal/compal_lib.h	2020-01-29 19:21:09.180453591 +0100
@@ -44,7 +44,7 @@
 #define COMPAL_PROC_FILE_BATT	"/proc/omnibook/battery"
 
 
-char  compal_model[COMPAL_MAX_MODEL_INFO];
+extern char  compal_model[COMPAL_MAX_MODEL_INFO];
 
 char *getvaluefromhash (char *key, char *hash);
 
diff -Naur wmpower-0.4.3.orig/src/power_management/power_management.c wmpower-0.4.3/src/power_management/power_management.c
--- wmpower-0.4.3.orig/src/power_management/power_management.c	2005-12-15 12:54:59.000000000 +0100
+++ wmpower-0.4.3/src/power_management/power_management.c	2020-01-29 19:18:36.031444239 +0100
@@ -55,6 +55,13 @@
 int use_noflushd=1;
 int use_cpufreq=1;
 
+kernel_versions kernel_version;
+int minBrightness;
+int maxBrightness;
+int waittime; /* /proc polling time */
+char *cpufreq_online_governor;
+char *cpufreq_offline_governor;
+
 /* Battery to monitor */
 int Battery;
 
diff -Naur wmpower-0.4.3.orig/src/power_management/power_management.h wmpower-0.4.3/src/power_management/power_management.h
--- wmpower-0.4.3.orig/src/power_management/power_management.h	2005-12-15 12:54:12.000000000 +0100
+++ wmpower-0.4.3/src/power_management/power_management.h	2020-01-29 19:18:29.941443870 +0100
@@ -34,7 +34,7 @@
 	IS_2_6 = 0,
 	IS_OTHER
 } kernel_versions;
-kernel_versions kernel_version;
+extern kernel_versions kernel_version;
 
 typedef struct
 {
@@ -49,11 +49,11 @@
 
 } pm_status;
 
-int minBrightness;
-int maxBrightness;
-int waittime; /* /proc polling time */
-char *cpufreq_online_governor;
-char *cpufreq_offline_governor;
+extern int minBrightness;
+extern int maxBrightness;
+extern int waittime; /* /proc polling time */
+extern char *cpufreq_online_governor;
+extern char *cpufreq_offline_governor;
 
 int pm_support(int which_battery);
 void get_power_status(pm_status *power_status);
diff -Naur wmpower-0.4.3.orig/src/power_management/toshiba/toshiba_lib.c wmpower-0.4.3/src/power_management/toshiba/toshiba_lib.c
--- wmpower-0.4.3.orig/src/power_management/toshiba/toshiba_lib.c	2005-09-02 11:46:16.000000000 +0200
+++ wmpower-0.4.3/src/power_management/toshiba/toshiba_lib.c	2020-01-29 19:19:47.112448563 +0100
@@ -57,6 +57,7 @@
 #include "lib_utils.h"
 #include "power_management.h"
 
+char toshiba_model[255];
 
 void UglyHack(void);
 int Get_Fan_Status(void);
diff -Naur wmpower-0.4.3.orig/src/power_management/toshiba/toshiba_lib.h wmpower-0.4.3/src/power_management/toshiba/toshiba_lib.h
--- wmpower-0.4.3.orig/src/power_management/toshiba/toshiba_lib.h	2005-09-02 11:34:04.000000000 +0200
+++ wmpower-0.4.3/src/power_management/toshiba/toshiba_lib.h	2020-01-29 19:19:38.749448053 +0100
@@ -34,7 +34,7 @@
 #define TOSHIBA_LCD_MED 1
 #define TOSHIBA_LCD_MAX 2
 
-char toshiba_model[255];
+extern char toshiba_model[255];
 
 int machine_is_toshiba(int *use_toshiba_hardware);
 int toshiba_get_fan_status(int use_toshiba_hardware);