From fa41bdfbc0b962fd73b89f01aab1a5370c9c28eb Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sun, 1 Oct 2017 14:31:10 +0200 Subject: [PATCH] shared: struct timespec is in time.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On the musl C library, tests/timespec-text.c does not build, with the following error: In file included from tests/timespec-test.c:36:0: ./shared/timespec-util.h:41:21: warning: ‘struct timespec’ declared inside parameter list will not be visible outside of this definition or declaration timespec_sub(struct timespec *r, ^~~~~~~~ [...] Indeed, struct timespec is defined in time.h, so we must include it. Signed-off-by: "Yann E. MORIN" Reviewed-by: Pekka Paalanen --- shared/timespec-util.h | 1 + 1 file changed, 1 insertion(+) diff --git a/shared/timespec-util.h b/shared/timespec-util.h index 576b3e8f..34a120ae 100644 --- a/shared/timespec-util.h +++ b/shared/timespec-util.h @@ -28,6 +28,7 @@ #include #include +#include #define NSEC_PER_SEC 1000000000