mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-05 21:07:52 +00:00
fix compiling for freebsd
Tested using default options, lua disabled as only lua50 available in 7.2-RELEASE.
This commit is contained in:
parent
8f1eae1b94
commit
40792b7d05
@ -2097,6 +2097,7 @@ void generate_text_internal(char *p, int p_max_size,
|
|||||||
/* we have four different types of top (top, top_mem,
|
/* we have four different types of top (top, top_mem,
|
||||||
* top_time and top_io). To avoid having almost-same code four
|
* top_time and top_io). To avoid having almost-same code four
|
||||||
* times, we have this special handler. */
|
* times, we have this special handler. */
|
||||||
|
#ifdef __linux__
|
||||||
break;
|
break;
|
||||||
case OBJ_top:
|
case OBJ_top:
|
||||||
case OBJ_top_mem:
|
case OBJ_top_mem:
|
||||||
@ -2107,6 +2108,7 @@ void generate_text_internal(char *p, int p_max_size,
|
|||||||
/* yes, passing top_name_width instead
|
/* yes, passing top_name_width instead
|
||||||
* of p_max_size is intended here */
|
* of p_max_size is intended here */
|
||||||
print_top(obj, p, top_name_width);
|
print_top(obj, p, top_name_width);
|
||||||
|
#endif /* __linux__ */
|
||||||
OBJ(tail) {
|
OBJ(tail) {
|
||||||
print_tailhead("tail", obj, p, p_max_size);
|
print_tailhead("tail", obj, p, p_max_size);
|
||||||
}
|
}
|
||||||
|
@ -523,8 +523,6 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
|||||||
parse_platform_sensor(obj, arg);
|
parse_platform_sensor(obj, arg);
|
||||||
END OBJ_ARG(hwmon, 0, "hwmon needs argumanets")
|
END OBJ_ARG(hwmon, 0, "hwmon needs argumanets")
|
||||||
parse_hwmon_sensor(obj, arg);
|
parse_hwmon_sensor(obj, arg);
|
||||||
#endif /* __linux__ */
|
|
||||||
|
|
||||||
END
|
END
|
||||||
/* we have four different types of top (top, top_mem, top_time and top_io). To
|
/* we have four different types of top (top, top_mem, top_time and top_io). To
|
||||||
* avoid having almost-same code four times, we have this special
|
* avoid having almost-same code four times, we have this special
|
||||||
@ -537,7 +535,6 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
|||||||
}
|
}
|
||||||
} else OBJ(addr, &update_net_stats)
|
} else OBJ(addr, &update_net_stats)
|
||||||
parse_net_stat_arg(obj, arg, free_at_crash);
|
parse_net_stat_arg(obj, arg, free_at_crash);
|
||||||
#if defined(__linux__)
|
|
||||||
END OBJ(addrs, &update_net_stats)
|
END OBJ(addrs, &update_net_stats)
|
||||||
parse_net_stat_arg(obj, arg, free_at_crash);
|
parse_net_stat_arg(obj, arg, free_at_crash);
|
||||||
#endif /* __linux__ */
|
#endif /* __linux__ */
|
||||||
@ -682,7 +679,9 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
|||||||
extract_variable_text_internal(obj->sub, arg);
|
extract_variable_text_internal(obj->sub, arg);
|
||||||
END OBJ(processes, &update_total_processes)
|
END OBJ(processes, &update_total_processes)
|
||||||
END OBJ(running_processes, &update_running_processes)
|
END OBJ(running_processes, &update_running_processes)
|
||||||
|
#ifdef __linux__
|
||||||
END OBJ(threads, &update_threads)
|
END OBJ(threads, &update_threads)
|
||||||
|
#endif
|
||||||
END OBJ(shadecolor, 0)
|
END OBJ(shadecolor, 0)
|
||||||
#ifdef X11
|
#ifdef X11
|
||||||
obj->data.l = arg ? get_x11_color(arg) : default_bg_color;
|
obj->data.l = arg ? get_x11_color(arg) : default_bg_color;
|
||||||
@ -737,13 +736,13 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
|||||||
#endif
|
#endif
|
||||||
END OBJ(uptime_short, &update_uptime)
|
END OBJ(uptime_short, &update_uptime)
|
||||||
END OBJ(uptime, &update_uptime)
|
END OBJ(uptime, &update_uptime)
|
||||||
|
#if defined(__linux__)
|
||||||
END OBJ(user_names, &update_users)
|
END OBJ(user_names, &update_users)
|
||||||
END OBJ(user_times, &update_users)
|
END OBJ(user_times, &update_users)
|
||||||
END OBJ_ARG(user_time, 0, "user time needs a console name as argument")
|
END OBJ_ARG(user_time, 0, "user time needs a console name as argument")
|
||||||
obj->data.s = strndup(arg, text_buffer_size);
|
obj->data.s = strndup(arg, text_buffer_size);
|
||||||
END OBJ(user_terms, &update_users)
|
END OBJ(user_terms, &update_users)
|
||||||
END OBJ(user_number, &update_users)
|
END OBJ(user_number, &update_users)
|
||||||
#if defined(__linux__)
|
|
||||||
END OBJ(gw_iface, &update_gateway_info)
|
END OBJ(gw_iface, &update_gateway_info)
|
||||||
END OBJ(gw_ip, &update_gateway_info)
|
END OBJ(gw_ip, &update_gateway_info)
|
||||||
#endif /* !__linux__ */
|
#endif /* !__linux__ */
|
||||||
@ -1517,6 +1516,7 @@ void free_text_objects(struct text_object *root, int internal)
|
|||||||
case OBJ_nameserver:
|
case OBJ_nameserver:
|
||||||
free_dns_data();
|
free_dns_data();
|
||||||
break;
|
break;
|
||||||
|
#ifdef __linux__
|
||||||
case OBJ_top:
|
case OBJ_top:
|
||||||
case OBJ_top_mem:
|
case OBJ_top_mem:
|
||||||
case OBJ_top_time:
|
case OBJ_top_time:
|
||||||
@ -1525,6 +1525,7 @@ void free_text_objects(struct text_object *root, int internal)
|
|||||||
#endif
|
#endif
|
||||||
free_top(obj, internal);
|
free_top(obj, internal);
|
||||||
break;
|
break;
|
||||||
|
#endif /* __linux__ */
|
||||||
#ifdef HDDTEMP
|
#ifdef HDDTEMP
|
||||||
case OBJ_hddtemp:
|
case OBJ_hddtemp:
|
||||||
if (data.s) {
|
if (data.s) {
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "net/if.h"
|
#include "net/if.h"
|
||||||
#include "text_object.h"
|
#include "text_object.h"
|
||||||
#include "net_stat.h"
|
#include "net_stat.h"
|
||||||
|
#include <netinet/in.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
struct read_tcp_data {
|
struct read_tcp_data {
|
||||||
char *host;
|
char *host;
|
||||||
|
Loading…
Reference in New Issue
Block a user