Skip to content

Include glibconfig.h to get the G_OS_UNIX token

When updating to 2.68.0 on OmniOS (illumos distribution), the following compile error occurs:

../../glib-2.68.0/glib/ghostutils.c:423:15: error: implicit declaration of function 'sysconf'; did you mean '_sysconf'? [-Werror=implicit-function-declaration]
  423 |   glong max = sysconf (_SC_HOST_NAME_MAX);
      |               ^~~~~~~
      |               _sysconf

sysconf() requires <unistd.h> which is guarded by G_OS_UNIX.

Merge request reports