Skip to content

os: fallback for unsupported posix_fallocate

Ihor Antonov requested to merge ngortheone/wayland:fallocate_fallback into master

Some filesystems do not support fallocate and return EOPNOTSUPP.

On musl-based distros libwayland-cursor exits abruptly which causes the application to crash. Unlike glibc, musl does not provide a fallback mechanism for handling unsupported fallocate. Instead, musl developers argue that application should handle the case of unsupported system call.

This commit allows falback to ftruncate in case when EOPNOTSUPP was recieved.

Merge request reports