This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix sparc64 build.


Another side effect of moving get_clockfreq into librt is that
we can't resolve strtoull on 64-bit.

Fix this by using strtoumax instead.

Committed to master.

	* sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
	(__get_clockfreq_via_proc_openprom): Use strtoumax instead
	of strtoull.
---
 ChangeLog                                             | 6 ++++++
 sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 6656fa1..f812784 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-10-25  David S. Miller  <davem@davemloft.net>
+
+	* sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
+	(__get_clockfreq_via_proc_openprom): Use strtoumax instead
+	of strtoull.
+
 2012-10-25  Roland McGrath  <roland@hack.frob.com>
 
 	* sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c b/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
index abd0ebf..cb31e5c 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
@@ -129,7 +129,7 @@ __get_clockfreq_via_proc_openprom (void)
 			  if (read (clkfreq_fd, type_string,
 				    sizeof (type_string)) > 0)
 			    result = (hp_timing_t)
-			      strtoull (type_string, NULL, 16);
+			      strtoumax (type_string, NULL, 16);
 			  close (clkfreq_fd);
 			}
 		    }
-- 
1.7.12.2.dirty


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]