package/ibrcommon: fix basename call under musl
authorBrendan Heading <brendanheading@gmail.com>
Mon, 14 Sep 2015 22:26:51 +0000 (23:26 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 20 Sep 2015 12:50:58 +0000 (14:50 +0200)
commit186d5d1b5f393d074d6ad205d8ef7e7c471f09e7
treec4e76a2d3dce7c454f05d3df06ceb50e0303ebab
parent6d475da9a0037bc6efbdeb482e2f678bb8089e70
package/ibrcommon: fix basename call under musl

Fixes:
http://autobuild.buildroot.net/results/9c3/9c3889fe80e58b7a35c242332f993992044d2f6b/

ibrcommon was relying on a glibc extension to basename(3) which allowed it
to accept a const char* parameter (instead of char*). Fixed by testing
for __GLIBC__; if not defined (such as when musl is in use) a fallback
block is used which creates a temporary copy of the path.

Signed-off-by: Brendan Heading <brendanheading@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/ibrcommon/0001-ibrcommon-data-File.cpp-support-POSIX-basename-call.patch [new file with mode: 0644]