Skip to content

meson: fix build for other UNIX systems (e.g. FreeBSD)

Without this change the build of unix/ftsystem will fail because the ftconfig.h header that defines macros such as HAVE_UNISTD_H and HAVE_FCNTL_H is only being generated for Linux,macOS and Cygwin systems:

../../freetype2/builds/unix/ftsystem.c:258:32: error: use of undeclared identifier 'O_RDONLY'
    file = open( filepathname, O_RDONLY );

Instead of hardcoding a list of operating systems for this check, update the logic above that decides whether to build the file and set a boolean flag that can be checked instead.

Edited by Alexander Richardson

Merge request reports