X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fntpd.c;h=67fff22a82e026f2b75e5785ddd7904dd8983818;hb=1eb3c043cb162ef198f86034cf7604be4a0a0d9c;hp=a8f6c31874d6db32e7c083632a684a79bddcada9;hpb=89fc8d1d16779841bd693020d9035aa5f35f127d;p=collectd.git diff --git a/src/ntpd.c b/src/ntpd.c index a8f6c318..67fff22a 100644 --- a/src/ntpd.c +++ b/src/ntpd.c @@ -19,6 +19,7 @@ * Florian octo Forster **/ +#define _DEFAULT_SOURCE #define _BSD_SOURCE /* For NI_MAXHOST */ #include "collectd.h" @@ -481,7 +482,7 @@ static int ntpd_receive_response (int *res_items, int *res_size, poll_s.fd = sd; poll_s.events = POLLIN | POLLPRI; poll_s.revents = 0; - + DEBUG ("Polling for %ims", timeout); status = poll (&poll_s, 1, timeout); @@ -521,7 +522,7 @@ static int ntpd_receive_response (int *res_items, int *res_size, DEBUG ("recv'd %i bytes", status); - /* + /* * Do some sanity checks first */ if (status < RESP_HEADER_SIZE) @@ -730,7 +731,7 @@ static int ntpd_send_request (int req_code, int req_items, int req_size, char *r req.err_nitems = ERR_NITEMS (0, req_items); req.mbz_itemsize = MBZ_ITEMSIZE (req_size); - + if (req_data != NULL) memcpy ((void *) req.data, (const void *) req_data, req_data_len);