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:
parent
2e2765393e
commit
40f2fcfd7b
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
|
||||
|
10
src/rss.c
10
src/rss.c
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user