diff mbox

[v5,6/8] performance: odp_scheduling: fix c99 implicit declaration of function ‘clock_gettime’

Message ID 1425048757-28438-6-git-send-email-mike.holmes@linaro.org
State Accepted
Commit d49d9a9e21f4c4498b9767f695810154498511a0
Headers show

Commit Message

Mike Holmes Feb. 27, 2015, 2:52 p.m. UTC
odp_scheduling.c:714:2: error: implicit declaration of function
‘clock_gettime’ [-Werror=implicit-function-declaration]
  if (clock_gettime(CLOCK_MONOTONIC, &tp2)) {

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 test/performance/odp_scheduling.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c
index ae86207..99f0f9b 100644
--- a/test/performance/odp_scheduling.c
+++ b/test/performance/odp_scheduling.c
@@ -10,6 +10,9 @@ 
  * @example  odp_example.c ODP example application
  */
 
+/* enable clock_gettime */
+#define _POSIX_C_SOURCE 200112L
+
 #include <string.h>
 #include <stdlib.h>