X/Open is needed for strptime,
sys/select.h is needed for some libcurl versions, and
mktime is the POSIX variant of timegm (+ localization).
* 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);