mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-30 18:49:31 +00:00
These changes are required to make it build on FreeBSD i386 (x86/32)
Otherwise I get this error while building: /wrkdirs/usr/ports/sysutils/conky/work/conky-1.11.1/src/core.cc:1503:50: error: assigning to 'void (*)(struct text_object *, char *, unsigned int)' from incompatible type 'void (*)(struct text_object *, char *, int)': type mismatch at 3rd parameter ('unsigned int' vs 'int') END OBJ(apm_adapter, 0) obj->callbacks.print = &print_apm_adapter; ^~~~~~~~~~~~~~~~~~ /wrkdirs/usr/ports/sysutils/conky/work/conky-1.11.1/src/core.cc:1504:55: error: assigning to 'void (*)(struct text_object *, char *, unsigned int)' from incompatible type 'void (*)(struct text_object *, char *, int)': type mismatch at 3rd parameter ('unsigned int' vs 'int') END OBJ(apm_battery_life, 0) obj->callbacks.print = &print_apm_battery_life; ^~~~~~~~~~~~~~~~~~~~~~~ /wrkdirs/usr/ports/sysutils/conky/work/conky-1.11.1/src/core.cc:1505:55: error: assigning to 'void (*)(struct text_object *, char *, unsigned int)' from incompatible type 'void (*)(struct text_object *, char *, int)': type mismatch at 3rd parameter ('unsigned int' vs 'int') END OBJ(apm_battery_time, 0) obj->callbacks.print = &print_apm_battery_time; ^~~~~~~~~~~~~~~~~~~~~~~ 3 errors generated. *** [src/CMakeFiles/conky.dir/core.cc.o] Error code 1
This commit is contained in:
parent
a3b03f2257
commit
21b4a0a403
@ -61,7 +61,7 @@ static int apm_getinfo(int fd, apm_info_t aip) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_apm_adapter(struct text_object *obj, char *p, int p_max_size) {
|
void print_apm_adapter(struct text_object *obj, char *p, unsigned int p_max_size) {
|
||||||
int fd;
|
int fd;
|
||||||
const char *out;
|
const char *out;
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
@ -109,7 +109,7 @@ void print_apm_adapter(struct text_object *obj, char *p, int p_max_size) {
|
|||||||
snprintf(p, p_max_size, "%s", out);
|
snprintf(p, p_max_size, "%s", out);
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_apm_battery_life(struct text_object *obj, char *p, int p_max_size) {
|
void print_apm_battery_life(struct text_object *obj, char *p, unsigned int p_max_size) {
|
||||||
int fd;
|
int fd;
|
||||||
u_int batt_life;
|
u_int batt_life;
|
||||||
const char *out;
|
const char *out;
|
||||||
@ -150,7 +150,7 @@ void print_apm_battery_life(struct text_object *obj, char *p, int p_max_size) {
|
|||||||
snprintf(p, p_max_size, "%s", out);
|
snprintf(p, p_max_size, "%s", out);
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_apm_battery_time(struct text_object *obj, char *p, int p_max_size) {
|
void print_apm_battery_time(struct text_object *obj, char *p, unsigned int p_max_size) {
|
||||||
int fd;
|
int fd;
|
||||||
int batt_time;
|
int batt_time;
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
|
@ -29,8 +29,8 @@
|
|||||||
#ifndef _BSDAPM_H
|
#ifndef _BSDAPM_H
|
||||||
#define _BSDAPM_H
|
#define _BSDAPM_H
|
||||||
|
|
||||||
void print_apm_adapter(struct text_object *, char *, int);
|
void print_apm_adapter(struct text_object *, char *, unsigned int);
|
||||||
void print_apm_battery_life(struct text_object *, char *, int);
|
void print_apm_battery_life(struct text_object *, char *, unsigned int);
|
||||||
void print_apm_battery_time(struct text_object *, char *, int);
|
void print_apm_battery_time(struct text_object *, char *, unsigned int);
|
||||||
|
|
||||||
#endif /* _BSDAPM_H */
|
#endif /* _BSDAPM_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user