This is the mail archive of the
frysk@sourceware.org
mailing list for the frysk project.
libdw vs __extern_inline
- From: Mark Wielaard <mark at klomp dot org>
- To: Frysk Hackers <frysk at sourceware dot org>
- Cc: roland at redhat dot com
- Date: Fri, 05 Oct 2007 13:55:05 +0200
- Subject: libdw vs __extern_inline
Hi Roland,
I tried compiling frysk and the embedded elfutils/libdw on Fedora 8 Test
3 and got the following error:
In file included from ../../frysk/frysk-sys/lib/dwfl/cni/Dwarf.cxx:43:
../../frysk/frysk-sys/../frysk-imports/elfutils/libdw/libdw.h:67:1: error: "__extern_inline" redefined
In file included from /usr/include/features.h:336,
from /usr/include/alloca.h:22,
from ../../frysk/frysk-sys/lib/dwfl/cni/Dwarf.cxx:39:
/usr/include/sys/cdefs.h:299:1: error: this is the location of the previous definition
I worked around it by checking whether or not __extern_inline is already
defined as shown below. Does that makes sense? And could that, or some
other workaround, be added upstream?
Thanks,
Mark
--- frysk-imports/elfutils/libdw/libdw.h 30 Aug 2007 19:53:47 -0000 1.9
+++ frysk-imports/elfutils/libdw/libdw.h 5 Oct 2007 11:50:55 -0000
@@ -61,11 +61,13 @@
# define __nonnull_attribute__(args...)
#endif
+#ifndef __extern_inline
#ifdef __GNUC_STDC_INLINE__
# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
#else
# define __extern_inline extern __inline
#endif
+#endif
/* Mode for the session. */