martinpitt / umockdev

Mock hardware devices for creating unit tests and bug reporting
https://launchpad.net/umockdev
GNU Lesser General Public License v2.1
308 stars 55 forks source link

Call libc's `readlink` directly in get_rdev #179

Closed peadar closed 2 years ago

peadar commented 2 years ago

Without this, we call the local readlink function, which will go through the "WRAP3" version of readlink.

It generally avoids having the UMOCKDEV_PATH doubly appended, so its mostly harmless from that point of view, but when '-fno-semantic-interposition' and _FORTIFY_SOURCE are enabled during compilation, there's the potential for the wrapper functions to get complex enough not to be inlineable, even though they are marked as always_inline, resulting in a compile error.