Patchwork [1/3] build: replace librt check function

login
register
mail settings
Submitter Roger Pau Monne
Date Feb. 21, 2012, 7:14 p.m.
Message ID <1329851680-3421-1-git-send-email-roger.pau@entel.upc.edu>
Download mbox | patch
Permalink /patch/143184/
State New
Headers show

Comments

Roger Pau Monne - Feb. 21, 2012, 7:14 p.m.
Replace clock_gettime with timer_gettime, since at least under
uclibc 0.9.33 the clock_getttime function can be used without linking
against librt (although the manual page states the opposite).

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
---
 configure |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/configure b/configure
index f9d5330..68eb3fa 100755
--- a/configure
+++ b/configure
@@ -2513,7 +2513,8 @@  fi
 cat > $TMPC <<EOF
 #include <signal.h>
 #include <time.h>
-int main(void) { return clock_gettime(CLOCK_REALTIME, NULL); }
+int main(void) { timer_t tid; struct itimerspec it; \
+                 return timer_gettime(tid, &it); }
 EOF
 
 if compile_prog "" "" ; then