1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

Fixed compilation issues with --enable-testing

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1164 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Kevin Lyles 2008-06-19 06:17:53 +00:00
parent 2e2765393e
commit 40f2fcfd7b
5 changed files with 14 additions and 9 deletions

View File

@ -122,6 +122,7 @@ int destroy_audacious_thread(void)
/* --------------------------------------------------- /* ---------------------------------------------------
* Worker thread function for audacious data sampling. * Worker thread function for audacious data sampling.
* --------------------------------------------------- */ * --------------------------------------------------- */
__attribute((noreturn))
void *audacious_thread_func(void *pvoid) void *audacious_thread_func(void *pvoid)
{ {
static audacious_t items; static audacious_t items;

View File

@ -121,11 +121,13 @@ void clear_mpd_stats(struct mpd_s *mpd)
void *update_mpd(void *arg) void *update_mpd(void *arg)
{ {
struct mpd_s *mpd;
if (arg == NULL) { if (arg == NULL) {
CRIT_ERR("update_mpd called with a null argument!"); CRIT_ERR("update_mpd called with a null argument!");
} }
struct mpd_s *mpd = (struct mpd_s *) arg; mpd = (struct mpd_s *) arg;
while (1) { while (1) {
mpd_Status *status; mpd_Status *status;

View File

@ -15,8 +15,8 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
#include "prss.h"
#include "conky.h" #include "conky.h"
#include "prss.h"
#include <libxml/parser.h> #include <libxml/parser.h>
#include <libxml/tree.h> #include <libxml/tree.h>

View File

@ -63,7 +63,7 @@ size_t WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
return realsize; return realsize;
} }
int rss_delay(int *wait, int delay) int rss_delay(int *wait_time, int delay)
{ {
time_t now = time(NULL); time_t now = time(NULL);
@ -73,13 +73,13 @@ int rss_delay(int *wait, int delay)
} }
delay *= 60; delay *= 60;
if (!*wait) { if (!*wait_time) {
*wait = now + delay; *wait_time = now + delay;
return 1; return 1;
} }
if (now >= *wait + delay) { if (now >= *wait_time + delay) {
*wait = now + delay; *wait_time = now + delay;
return 1; return 1;
} }

View File

@ -60,6 +60,10 @@ static timed_thread_list *p_timed_thread_list_tail = NULL;
static int now(struct timespec *abstime) static int now(struct timespec *abstime)
{ {
#ifndef HAVE_CLOCK_GETTIME
struct timeval tv;
#endif
if (!abstime) { if (!abstime) {
return -1; return -1;
} }
@ -68,8 +72,6 @@ static int now(struct timespec *abstime)
return clock_gettime(CLOCK_REALTIME, abstime); return clock_gettime(CLOCK_REALTIME, abstime);
#else #else
/* fallback to gettimeofday () */ /* fallback to gettimeofday () */
struct timeval tv;
if (gettimeofday(&tv, NULL) != 0) { if (gettimeofday(&tv, NULL) != 0) {
return -1; return -1;
} }