std.c: Add missing <sys/time.h> #include and _XOPEN_SOURCE.

This is required for gettimeofday() to be available (at least on
FreeBSD), causes compiler warnings otherwise.
This commit is contained in:
Uwe Hermann 2018-02-13 21:54:46 +01:00
parent a9a38e7511
commit d18bf7bdfc
1 changed files with 4 additions and 0 deletions

View File

@ -25,9 +25,13 @@
* @internal
*/
/* Needed for gettimeofday(), at least on FreeBSD. */
#define _XOPEN_SOURCE 700
#include <config.h>
#include <string.h>
#include <math.h>
#include <sys/time.h>
#include <glib.h>
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"