[glib: 1/2] Fix build failure on systems without spawn.h
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] Fix build failure on systems without spawn.h
- Date: Sat, 29 Sep 2018 09:18:31 +0000 (UTC)
commit a187c8900291c4266471da17f2073d81c663b832
Author: Ryan Schmidt <git ryandesign com>
Date: Mon Sep 24 01:36:35 2018 -0500
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 <string.h>
#include <stdlib.h> /* for fdwalk */
#include <dirent.h>
+
+#ifdef HAVE_SPAWN_H
#include <spawn.h>
+#endif /* HAVE_SPAWN_H */
#ifdef HAVE_CRT_EXTERNS_H
#include <crt_externs.h> /* 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',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]