From d18bf7bdfc4df94cfad5440388a699f7fe81143b Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Tue, 13 Feb 2018 21:54:46 +0100 Subject: [PATCH] std.c: Add missing #include and _XOPEN_SOURCE. This is required for gettimeofday() to be available (at least on FreeBSD), causes compiler warnings otherwise. --- src/std.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/std.c b/src/std.c index 48f83b53..b778679b 100644 --- a/src/std.c +++ b/src/std.c @@ -25,9 +25,13 @@ * @internal */ +/* Needed for gettimeofday(), at least on FreeBSD. */ +#define _XOPEN_SOURCE 700 + #include #include #include +#include #include #include #include "libsigrok-internal.h"