]> code.ossystems Code Review - openembedded-core.git/commit
dpkg: fix include header caused compile error
authorKai Kang <kai.kang@windriver.com>
Tue, 13 Aug 2013 09:57:49 +0000 (17:57 +0800)
committerPaul Eggleton <paul.eggleton@linux.intel.com>
Fri, 16 Aug 2013 09:39:42 +0000 (10:39 +0100)
commit0e60a468c1a81642d4319c0831dafd2f6fa43d86
tree15f4febbb7aaeda852c271678aed919153a8389b
parent4fbb129bdfac7de91b23cefd9431e81a385406b6
dpkg: fix include header caused compile error

Build dpkg-native on Fedora 19, it fails with:

/usr/include/c++/4.8.1/cstdlib: In function ‘long long int std::abs(long long int)’:
/usr/include/c++/4.8.1/cstdlib:174:20: error: declaration of C function ‘long long int std::abs(long long int)’ conflicts with
   abs(long long __x) { return __builtin_llabs (__x); }
                    ^
/usr/include/c++/4.8.1/cstdlib:166:3: error: previous declaration ‘long int std::abs(long int)’ here
   abs(long __i) { return __builtin_labs(__i); }
   ^

That because header cstdlib is included in a 'extern "C"' block that gcc
4.8 doesn't support. Fix it by move the header file out of the 'extern "C"'
block.

(From OE-Core master rev: 7de61ecc3efc43c625dde9a66f5c05e980a82e34)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch [new file with mode: 0644]
meta/recipes-devtools/dpkg/dpkg_1.16.9.bb