1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-30 05:59:07 +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.
* --------------------------------------------------- */
__attribute((noreturn))
void *audacious_thread_func(void *pvoid)
{
static audacious_t items;

View File

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

View File

@ -15,8 +15,8 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
#include "prss.h"
#include "conky.h"
#include "prss.h"
#include <libxml/parser.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;
}
int rss_delay(int *wait, int delay)
int rss_delay(int *wait_time, int delay)
{
time_t now = time(NULL);
@ -73,13 +73,13 @@ int rss_delay(int *wait, int delay)
}
delay *= 60;
if (!*wait) {
*wait = now + delay;
if (!*wait_time) {
*wait_time = now + delay;
return 1;
}
if (now >= *wait + delay) {
*wait = now + delay;
if (now >= *wait_time + delay) {
*wait_time = now + delay;
return 1;
}

View File

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