2010年11月16日 星期二

basename prototype mis-match between libiberty.h and string.h

oprofile-0.9.4

In file included from ../libutil/op_libiberty.h:27,
from op_spu_bfd.cpp:24:
/buildroot-2010.05/output/toolchain/binutils-2.20.1/include/libiberty.h:106: error: new declaration 'char* basename(const char*)'
/buildroot-2010.05/arm-none-linux-gnueabi/libc/usr/include/string.h:601: error: ambiguates old declaration 'const char* basename(const char*)'
make[4]: *** [op_spu_bfd.o] Error 1
make[4]: Leaving directory `/buildroot-2010.05/output/build/oprofile-0.9.4/libutil++'


basename prototype mis-match between libiberty.h and string.h
https://bugzilla.redhat.com/show_bug.cgi?id=487995

Fixed by:
diff --git a/configure.in b/configure.in
index 7ffd735..09384f9 100644
--- a/configure.in
+++ b/configure.in
@@ -100,6 +100,8 @@ AC_CHECK_LIB(popt, poptGetContext,, AC_MSG_ERROR([popt library not found]))

AX_BINUTILS

+AC_CHECK_DECLS([basename], [], [], [[#include <libgen.h>]])
+
# C++ tests

AC_LANG_CPLUSPLUS
--
1.7.0.4

沒有留言: