]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
closes bpo-13497: Fix `broken nice` configure test. (GH-12041)
authorngie-eign <1574099+ngie-eign@users.noreply.github.com>
Tue, 26 Feb 2019 05:34:24 +0000 (21:34 -0800)
committerBenjamin Peterson <benjamin@python.org>
Tue, 26 Feb 2019 05:34:24 +0000 (21:34 -0800)
Per POSIX, `nice(3)` requires `unistd.h` and `exit(3)` requires `stdlib.h`.

Fixing the test will prevent false positives with pedantic compilers like clang.

configure.ac

index bb7861bc0daa837a2d95ac649116b2bd0372a182..c7380caa196456ab0cffa0f2d698031aa7e2c3ec 100644 (file)
@@ -4727,6 +4727,8 @@ LIBS=$LIBS_no_readline
 AC_MSG_CHECKING(for broken nice())
 AC_CACHE_VAL(ac_cv_broken_nice, [
 AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <stdlib.h>
+#include <unistd.h>
 int main()
 {
        int val1 = nice(1);