HomeFreeBSD

elfutils: Fix port build after recent basename() API break

Description

elfutils: Fix port build after recent basename() API break

The previous basename() API was shadowing bugs anyway. This Linux-originated
library assumes GNU basename(3) behavior. GNU basename(3) is non-destructive
and non-allocating; it always returns a pointer into the original string. This
library uses that behavior to do things like compare pointer results directly
(the source path was already a basename) or subtract pointer values directly
(compute the substring that constitutes dirname).

Resolve the issue by aliasing all internal elfutils basename() invocations
through an implementation of GNU basename(3) named "eu_basename."

Build log highlighting the problem:
http://beefy4.nyi.freebsd.org/data/head-amd64-default/p419462_s303652/logs/elfutils-0.163_6.log

Approved by: bdrewery
Differential Revision: https://reviews.freebsd.org/D7404

Details

Committed
cemAug 5 2016, 5:35 PM
Differential Revision
D7404: elfutils: Fix port build after recent basename() API break
Parents
rP419696: Update perl vuxml entries
Branches
Unknown
Tags
Unknown