]> sigrok.org Git - libsigrok.git/commitdiff
std.c: Add missing <sys/time.h> #include and _XOPEN_SOURCE.
authorUwe Hermann <redacted>
Tue, 13 Feb 2018 20:54:46 +0000 (21:54 +0100)
committerUwe Hermann <redacted>
Tue, 13 Feb 2018 22:10:33 +0000 (23:10 +0100)
This is required for gettimeofday() to be available (at least on
FreeBSD), causes compiler warnings otherwise.

src/std.c

index 48f83b53b5856c1ae3c8740bc16d2d60bbaf02f1..b778679b38b30e6c7ac040721fa41cef841d65d6 100644 (file)
--- a/src/std.c
+++ b/src/std.c
  * @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"