1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-28 17:48:39 +00:00

Small portion of FreeBSD fixes:

- diskio.c is not needed for freebsd
- sync cpu freq related functions prototypes
- cleanup #indef's

It still doesn't compile on FreeBSD though.


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1117 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Roman Bogorodskiy 2008-05-03 12:30:05 +00:00
parent 9d280c9cd4
commit 947dfb558d
3 changed files with 7 additions and 3 deletions

View File

@ -55,7 +55,7 @@ endif
#endif
if BUILD_FREEBSD
freebsd = freebsd.c diskio.c
freebsd = freebsd.c
PTHREAD_LIBS = -pthread
endif

View File

@ -3583,9 +3583,11 @@ static struct text_object *construct_text_object(const char *s,
END OBJ(user_times, INFO_USERS)
END OBJ(user_terms, INFO_USERS)
END OBJ(user_number, INFO_USERS)
#if defined(__linux__)
END OBJ(gw_iface, INFO_GW)
END OBJ(gw_ip, INFO_GW)
END OBJ(if_gw, INFO_GW)
#endif /* !__linux__ */
#ifndef __OpenBSD__
END OBJ(adt746xcpu, 0)
END OBJ(adt746xfan, 0)
@ -5439,9 +5441,11 @@ static void generate_text_internal(char *p, int p_max_size,
if_jumped = 0;
}
}
#if defined(__linux__)
OBJ(ioscheduler) {
snprintf(p, p_max_size, "%s", get_ioscheduler(obj->data.s));
}
#endif
OBJ(kernel) {
snprintf(p, p_max_size, "%s", cur->uname_s.release);
}

View File

@ -519,7 +519,7 @@ __inline__ unsigned long long int rdtsc()
/* return system frequency in MHz (use divisor=1) or GHz (use divisor=1000) */
void get_freq_dynamic(char *p_client_buffer, size_t client_buffer_size,
char *p_format, int divisor)
const char *p_format, int divisor)
{
#if defined(__i386) || defined(__x86_64)
struct timezone tz;
@ -549,7 +549,7 @@ void get_freq_dynamic(char *p_client_buffer, size_t client_buffer_size,
}
/* void */
char get_freq(char *p_client_buffer, size_t client_buffer_size, char *p_format,
char get_freq(char *p_client_buffer, size_t client_buffer_size, const char *p_format,
int divisor, unsigned int cpu)
{
int freq;