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] Don't use undefined macros


It's possible to have neither FUTEX_CLOCK_REALTIME nor __ASSUME_FUTEX_CLOCK_REALTIME defined. In this case nptl/init.c fails to compile.

Please apply this patch to fix the problem.

Thanks

Andrew
2009-01-29  Andrew Stubbs  <ams@codesourcery.com>

	* nptl/init.c (__pthread_initialize_minimal_internal): Check
	FUTEX_CLOCK_REALTIME is defined before using it.

---
 src/glibc-mainline/nptl/init.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: src/glibc-mainline/nptl/init.c
===================================================================
--- src/glibc-mainline/nptl/init.c.orig
+++ src/glibc-mainline/nptl/init.c
@@ -316,7 +316,7 @@ __pthread_initialize_minimal_internal (v
      kernel will return ENOSYS for unknown operations.  */
   if (THREAD_GETMEM (pd, header.private_futex) != 0)
 #endif
-#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
+#if !defined( __ASSUME_FUTEX_CLOCK_REALTIME) && defined(FUTEX_CLOCK_REALTIME)
     {
       int word = 0;
       /* NB: the syscall actually takes six parameters.  The last is the

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