[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] fix compilation issue on cross-arm build



I'm not sure but it looks like this problem has been introduced by the
latest merge (r13883).
The problem was a missing definition reported for 'name' in has_cpuclock.

I'm not sure my  patch is good either. Please comment.

The log entry is a bit terse, I'm ok to review it if the patch looks
good to you.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
From dc645253b988fd4b75ca3ac820c56c79573a9108 Mon Sep 17 00:00:00 2001
From: Pascal Obry <pascal.obry@xxxxxx>
Date: Mon, 23 May 2011 14:00:05 +0200
Subject: [PATCH] Fix has_cpuclock definition.

---
 libc/sysdeps/unix/sysv/linux/sysconf.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libc/sysdeps/unix/sysv/linux/sysconf.c b/libc/sysdeps/unix/sysv/linux/sysconf.c
index e44aa99..096c7ed 100644
--- a/libc/sysdeps/unix/sysv/linux/sysconf.c
+++ b/libc/sysdeps/unix/sysv/linux/sysconf.c
@@ -37,7 +37,7 @@ static long int posix_sysconf (int name);
 
 #ifndef HAS_CPUCLOCK
 static long int
-has_cpuclock (void)
+has_cpuclock (int name)
 {
 # if defined __NR_clock_getres || HP_TIMING_AVAIL
   /* If we have HP_TIMING, we will fall back on that if the system
@@ -59,7 +59,7 @@ has_cpuclock (void)
   return -1;
 # endif
 }
-# define HAS_CPUCLOCK() has_cpuclock ()
+# define HAS_CPUCLOCK has_cpuclock
 #endif
 
 
@@ -86,7 +86,7 @@ __sysconf (int name)
 
     case _SC_CPUTIME:
     case _SC_THREAD_CPUTIME:
-      return HAS_CPUCLOCK ();
+      return HAS_CPUCLOCK (name);
 
     case _SC_ARG_MAX:
 #if __LINUX_KERNEL_VERSION < 0x020617
-- 
1.7.5.1.249.gdbe9c