ptsname_r is a non-portable GNU extension
Unfortunately, POSIX doesn't seem to have a thread-safe version of ptsname
, and ptsname_r
is not available on FreeBSD. I am not sure how should we fix the issue. Should we simply fallback to the thread-unsafe ptsname
, or implement an equivalent of ptsname_r
for FreeBSD and leave an #error
in the #else
block for other operating systems? ptsname
on FreeBSD is a simple wrapper of fdevname_r
, so it is possible to implement a thread-safe ptsname_r
with fdevname_r
.
I found there is fallback code in src/libide/util/ptyintercept.c
using F_SETFD
to set O_NONBLOCK
. I haven't checked whether it works, but the man page says FD_CLOEXEC
is the only flag that can be used with F_SETFD
. Other O_*
flags should be set by F_SETFL
.
There are still a few problems which prevent GNOME Builder from working properly on FreeBSD. This is just a quick note because I haven't spend time making patches for them.
-
ctags
should be moved to the bottom of the list of possible names infind_program
call indata/gsettings/meson.build
, soexctags
can be found beforectags
. -
autoreconf
is usually installed in/usr/local/bin
instead of/usr/bin
, so autotools projects cannot be built because of 'command not found' error. - The default
grep
command is too old and it doesn't support--exclude-dir
. We may want to add a meson option for specifying the path to a recent version of GNU grep. - GNOME Builder hangs in 'Caching build commands' step. I haven't debugged this issue.