Skip to content
Permalink
Browse files

glib2-devel: Fix spawn.h patch per upstream advice

  • Loading branch information
ryandesign committed Sep 29, 2018
1 parent e61045c commit 0c84bf3fafba6014e3f5a478f31fb2f69af44777
Showing with 22 additions and 2 deletions.
  1. +22 −2 devel/glib2-devel/files/POSIX-spawn.patch
@@ -1,15 +1,35 @@
Fix build failure on systems without POSIX spawn (e.g. Tiger).
https://gitlab.gnome.org/GNOME/glib/merge_requests/345
--- configure.ac.orig 2018-09-28 22:48:05.000000000 -0500
+++ configure.ac 2018-09-28 22:57:08.000000000 -0500
@@ -638,6 +638,7 @@
AC_CHECK_HEADERS([mntent.h sys/mnttab.h sys/vfstab.h sys/mntctl.h fstab.h])
AC_CHECK_HEADERS([linux/magic.h])
AC_CHECK_HEADERS([termios.h])
+AC_CHECK_HEADERS([spawn.h])

# Some versions of MSC lack these
AC_CHECK_HEADERS([dirent.h sys/time.h])
--- glib/gspawn.c.orig 2018-09-24 00:50:28.000000000 -0500
+++ glib/gspawn.c 2018-09-24 01:29:42.000000000 -0500
@@ -30,7 +30,10 @@
#include <string.h>
#include <stdlib.h> /* for fdwalk */
#include <dirent.h>
+
+#ifdef HAVE_POSIX_SPAWN
+#ifdef HAVE_SPAWN_H
#include <spawn.h>
+#endif
+#endif /* HAVE_SPAWN_H */

#ifdef HAVE_CRT_EXTERNS_H
#include <crt_externs.h> /* for _NSGetEnviron */
--- meson.build.orig 2018-09-21 09:23:53.000000000 -0500
+++ meson.build 2018-09-28 22:58:00.000000000 -0500
@@ -226,6 +226,7 @@
'poll.h',
'pwd.h',
'sched.h',
+ 'spawn.h',
'stdint.h',
'stdlib.h',
'string.h',

0 comments on commit 0c84bf3

Please sign in to comment.
You can’t perform that action at this time.