From fbb34761a3e3bc1befaaa1e07808371473216304 Mon Sep 17 00:00:00 2001 From: smlng Date: Tue, 16 Jan 2018 11:07:19 +0100 Subject: [PATCH] examples/posix_sockets: fix undefined usleep --- examples/posix_sockets/udp.c | 5 +++++ tests/posix_time/main.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/examples/posix_sockets/udp.c b/examples/posix_sockets/udp.c index ecf30bf6e8..b49edf9fc6 100644 --- a/examples/posix_sockets/udp.c +++ b/examples/posix_sockets/udp.c @@ -18,6 +18,11 @@ * @} */ +/* needed for posix usleep */ +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 600 +#endif + #include #include #include diff --git a/tests/posix_time/main.c b/tests/posix_time/main.c index 5c94cbefb5..e79fbced2b 100644 --- a/tests/posix_time/main.c +++ b/tests/posix_time/main.c @@ -19,6 +19,11 @@ * @} */ +/* needed for posix usleep */ +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 600 +#endif + #include #include