summaryrefslogtreecommitdiffstats
path: root/disk-utils
diff options
context:
space:
mode:
authorPatrick Steinhardt2018-09-26 08:23:09 +0200
committerKarel Zak2018-10-04 11:56:37 +0200
commitd2523d3dd2125903ff0e4655b4b4712f92e49d78 (patch)
tree1894e50e595fb55e59188ed068298fee6729cd0d /disk-utils
parentlsblk: fix unknown type `stat` caused by missing header (diff)
downloadkernel-qcow2-util-linux-d2523d3dd2125903ff0e4655b4b4712f92e49d78.tar.gz
kernel-qcow2-util-linux-d2523d3dd2125903ff0e4655b4b4712f92e49d78.tar.xz
kernel-qcow2-util-linux-d2523d3dd2125903ff0e4655b4b4712f92e49d78.zip
rename: avoid undefined function prototype for `fpurge`
In case where the non-standard `fpurge` function is available, we redefine `__fpurge` to `fpurge`. We can do so because the only difference between both functions is that one returns an error code while the other does not. But as we do not check the error code either way, we do not care about which one of them we use. The above redefinition happens unconditionally if we know that `fpurge` exists. Most notably, we also redefine it if we already do have an `__fpurge` function available that could be used. This causes problems on musl-based platforms, where we detect availability of `fpurge` in libc, but where no function declaration for it exists in "stdio_ext.h". The compiler thus prints a warning due to an unknown function, even though it will link just fine. Avoid this warning by only redefining `__fpurge` to `fpurge` when HAVE___FPURGE is not defined. Signed-off-by: Patrick Steinhardt <ps@pks.im>
Diffstat (limited to 'disk-utils')
0 files changed, 0 insertions, 0 deletions