From a187c8900291c4266471da17f2073d81c663b832 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Mon, 24 Sep 2018 01:36:35 -0500 Subject: [PATCH] Fix build failure on systems without spawn.h --- configure.ac | 1 + glib/gspawn.c | 3 +++ meson.build | 1 + 3 files changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 386efcf63..b69b27ca5 100644 --- a/configure.ac +++ b/configure.ac @@ -639,6 +639,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([alloca.h]) +AC_CHECK_HEADERS([spawn.h]) # Some versions of MSC lack these AC_CHECK_HEADERS([dirent.h sys/time.h]) diff --git a/glib/gspawn.c b/glib/gspawn.c index 5d0c29d70..23ade06ae 100644 --- a/glib/gspawn.c +++ b/glib/gspawn.c @@ -30,7 +30,10 @@ #include #include /* for fdwalk */ #include + +#ifdef HAVE_SPAWN_H #include +#endif /* HAVE_SPAWN_H */ #ifdef HAVE_CRT_EXTERNS_H #include /* for _NSGetEnviron */ diff --git a/meson.build b/meson.build index adb07638e..dd5bd8f3f 100644 --- a/meson.build +++ b/meson.build @@ -227,6 +227,7 @@ headers = [ 'poll.h', 'pwd.h', 'sched.h', + 'spawn.h', 'stdint.h', 'stdlib.h', 'string.h',