]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/process.c
Add conditional code for posix_spawn when using uClibc (Issue #5188)
[thirdparty/cups.git] / scheduler / process.c
index 65a3c88490d7aa21cc54bf1b725da3d1ff983afd..b8d49d8f0de3cea61fd05b6a5834dc3bbc39c1a9 100644 (file)
 #ifdef HAVE_POSIX_SPAWN
 #  include <spawn.h>
 extern char **environ;
-#endif /* HAVE_POSIX_SPAWN */
-#ifdef HAVE_POSIX_SPAWN
-#  if !defined(__OpenBSD__) || OpenBSD >= 201505
-#    define USE_POSIX_SPAWN 1
-#  else
+/* Don't use posix_spawn on systems with bugs in their implementations... */
+#  if defined(OpenBSD) && OpenBSD < 201505
 #    define USE_POSIX_SPAWN 0
-#  endif /* !__OpenBSD__ || */
+#  elif defined(__UCLIBC__) && __UCLIBC_MAJOR__ == 1 && __UCLIBC_MINOR__ == 0 && __UCLIBC_SUBLEVEL__ < 27
+#    define USE_POSIX_SPAWN 0
+#  elif defined(__UCLIBC__) && __UCLIBC_MAJOR__ < 1
+#    define USE_POSIX_SPAWN 0
+#  else /* All other platforms */
+#    define USE_POSIX_SPAWN 1
+#  endif /* ... */
 #else
 #  define USE_POSIX_SPAWN 0
 #endif /* HAVE_POSIX_SPAWN */