Fix -Wundef warning for HAVE_IFUNC

Message ID mvmegx1bxxo.fsf@hawking.suse.de
State Committed
Headers

Commit Message

Andreas Schwab July 31, 2014, 10:54 a.m. UTC
  Tested on m68k-suse-linux.

Andreas.

	* config.h.in (HAVE_IFUNC): Define to 0.
	* rt/clock-compat.c [HAVE_IFUNC]: Check for value, not
	definedness.
---
 config.h.in       | 4 ++--
 rt/clock-compat.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
  

Comments

Siddhesh Poyarekar July 31, 2014, 12:57 p.m. UTC | #1
On Thu, Jul 31, 2014 at 12:54:43PM +0200, Andreas Schwab wrote:
> Tested on m68k-suse-linux.
> 
> Andreas.
> 
> 	* config.h.in (HAVE_IFUNC): Define to 0.
> 	* rt/clock-compat.c [HAVE_IFUNC]: Check for value, not
> 	definedness.

Looks OK to me.

Siddhesh
  

Patch

diff --git a/config.h.in b/config.h.in
index 97b5571..d612a04 100644
--- a/config.h.in
+++ b/config.h.in
@@ -194,8 +194,8 @@ 
 /* Define if the dynamic linker should consult an ld.so.cache file.  */
 #undef USE_LDCONFIG
 
-/* Define if STT_GNU_IFUNC support actually works.  */
-#undef HAVE_IFUNC
+/* Define to 1 if STT_GNU_IFUNC support actually works.  */
+#define HAVE_IFUNC 0
 
 /* Define if linux/fanotify.h is available.  */
 #undef HAVE_LINUX_FANOTIFY_H
diff --git a/rt/clock-compat.c b/rt/clock-compat.c
index 1ccc296..0a3ae40 100644
--- a/rt/clock-compat.c
+++ b/rt/clock-compat.c
@@ -27,7 +27,7 @@ 
 
 #include <time.h>
 
-#ifdef HAVE_IFUNC
+#if HAVE_IFUNC
 # define COMPAT_REDIRECT(name, proto, arglist)				      \
   __typeof (name) *name##_ifunc (void) asm (#name);			      \
   __typeof (name) *name##_ifunc (void)					      \