summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 495849c)
raw | patch | inline | side by side (parent: 495849c)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 4 May 2009 14:48:58 +0000 (16:48 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 4 May 2009 14:48:58 +0000 (16:48 +0200) |
X/Open is needed for strptime,
sys/select.h is needed for some libcurl versions, and
mktime is the POSIX variant of timegm (+ localization).
sys/select.h is needed for some libcurl versions, and
mktime is the POSIX variant of timegm (+ localization).
src/bind.c | patch | blob | history |
diff --git a/src/bind.c b/src/bind.c
index 587403d07727341fcb23e10ae1c9ba92ffa2f0e9..44efcfd55ba58982d6fdb2244a54ecac3b4e19b1 100644 (file)
--- a/src/bind.c
+++ b/src/bind.c
* Florian Forster <octo at verplant.org>
**/
+#define _XOPEN_SOURCE 600 /* glibc2 needs this for strptime */
#include "collectd.h"
#include "common.h"
#include "plugin.h"
#include "configfile.h"
+/* Some versions of libcurl don't include this themselves and then don't have
+ * fd_set available. */
+#if HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+
#include <curl/curl.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
return (-1);
}
- *ret_value = timegm(&tm);
+ *ret_value = mktime(&tm);
xmlXPathFreeObject (xpathObj);
return (0);