1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 21:49:07 +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:
Guido Falsi 2019-01-08 00:16:56 +01:00 committed by Brenden Matthews
parent a3b03f2257
commit 21b4a0a403
2 changed files with 6 additions and 6 deletions

View File

@ -61,7 +61,7 @@ static int apm_getinfo(int fd, apm_info_t aip) {
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;
const char *out;
#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);
}
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;
u_int batt_life;
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);
}
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 batt_time;
#ifdef __OpenBSD__

View File

@ -29,8 +29,8 @@
#ifndef _BSDAPM_H
#define _BSDAPM_H
void print_apm_adapter(struct text_object *, char *, int);
void print_apm_battery_life(struct text_object *, char *, int);
void print_apm_battery_time(struct text_object *, char *, int);
void print_apm_adapter(struct text_object *, char *, unsigned int);
void print_apm_battery_life(struct text_object *, char *, unsigned int);
void print_apm_battery_time(struct text_object *, char *, unsigned int);
#endif /* _BSDAPM_H */