Replace SSIZE_MAX with G_MAXSSIZE That way we don't have to define _POSIX_SOURCE, and in turn we get the definition of O_CLOEXEC on macOS.
diff --git a/glib/giounix.c b/glib/giounix.c index a5b8605..789721f 100644 --- a/glib/giounix.c +++ b/glib/giounix.c
@@ -33,8 +33,6 @@ #include "config.h" -#define _POSIX_SOURCE /* for SSIZE_MAX */ - #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> @@ -190,8 +188,8 @@ GIOUnixChannel *unix_channel = (GIOUnixChannel *)channel; gssize result; - if (count > SSIZE_MAX) /* At least according to the Debian manpage for read */ - count = SSIZE_MAX; + if (count > G_MAXSSIZE) /* At least according to the Debian manpage for read */ + count = G_MAXSSIZE; retry: result = read (unix_channel->fd, buf, count);