]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add conditional code for posix_spawn when using uClibc (Issue #5188)
authorMichael R Sweet <michaelrsweet@gmail.com>
Mon, 18 Dec 2017 22:26:19 +0000 (17:26 -0500)
committerMichael R Sweet <michaelrsweet@gmail.com>
Mon, 18 Dec 2017 22:26:19 +0000 (17:26 -0500)
CHANGES.md
scheduler/process.c

index 411340972d4500ca7ea4d63feb632054e805ffd8..cb56a4a089fa1fd55d562b37fd01c1924801db94 100644 (file)
@@ -1,4 +1,4 @@
-CHANGES - 2.3b1 - 2017-12-14
+CHANGES - 2.3b1 - 2017-12-18
 ============================
 
 
@@ -55,3 +55,4 @@ Changes in CUPS v2.3b1
   (Issue #5185)
 - The scheduler now substitutes default values for invalid job attributes when
   running in "relaxed conformance" mode (Issue #5186)
+- The scheduler did not work with older versions of uClibc (Issue #5188)
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 */