Fix POSIX conformance issues for clock_gettime

CLOCK_MONOTONIC should not be used as a feature macro.  The POSIX
feature macros are provided by unistd.h.  CLOCK_MONOTONIC is provided by
time.h.  CLOCK_MONOTONIC requires _POSIX_C_SOURCE >= 199309L on some
systems.
This commit is contained in:
Camilla Löwy
2019-12-15 17:24:26 +01:00
parent 506a6aafde
commit 081484ed34
4 changed files with 11 additions and 2 deletions
+3
View File
@@ -26,6 +26,8 @@
// It is fine to use C99 in this file because it will not be built with VS
//========================================================================
#define _POSIX_C_SOURCE 199309L
#include "internal.h"
#include <assert.h>
@@ -38,6 +40,7 @@
#include <sys/mman.h>
#include <sys/timerfd.h>
#include <unistd.h>
#include <time.h>
#include <wayland-client.h>