libnftnl: add patch to avoid symbol conflict
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 16 Aug 2014 13:35:48 +0000 (15:35 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 17 Aug 2014 07:10:40 +0000 (09:10 +0200)
commit06a603b8d55a5aea51a31c2d3f6f76d0b8218fc6
tree74c9e3ab33df612d3ec8ee4958778d53d3d25509
parent34e3857d9855197bb52a4056ad1f2a95a67d08f8
libnftnl: add patch to avoid symbol conflict

When ELF binaries and shared libraries are used, the internal
functions of libnftnl such as xfree() are not visible to the outside
world (their visibility is 'hidden'). Therefore, the fact that other
programs (especially nftables) may have symbols with the same name
does not cause any problem.

However, when doing static linking on a non-ELF platform (such as
Blackfin, which uses the FLAT binary format), there is no way of
encoding this visibility. Therefore, the xfree() symbols of libnftnl
becomes visible to the outside world, causing a conflict with the
xfree() symbol defined by nftables.

To solve this, this patch renames the libnftnl xfree() function to
libnftnl_xfree().

This commit fixes a problem seen after building nftables statically on
Blackfin. This problem was seen after the previous patch fixing the
autobuilder failure:

  http://autobuild.buildroot.org/results/98b/98b707ffdeeb1cda94b7c1019ef29cf5fd7db8bf/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/libnftnl/libnftnl-0001-rename-xfree.patch [new file with mode: 0644]