[Python-Dev] CVS build failures? posixmodule.c on Linux RH6.1
Barry A. Warsaw
barry@digicool.com
Wed, 11 Jul 2001 18:05:20 -0400
I just did a fresh cvs update, make distclean, configure, make and
posixmodule.c is now failing to compile. Looks like it's Thomas
recent nice() patch that's failing because PRIO_PROCESS isn't defined
unless sys/resource.h is #included (at least on this RH6.1-ish Linux
box).
The following patch seems to fix the problem for me. Comments?
-Barry
-------------------- snip snip --------------------
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.191
diff -u -r2.191 posixmodule.c
--- posixmodule.c 2001/07/11 14:45:34 2.191
+++ posixmodule.c 2001/07/11 22:04:29
@@ -32,6 +32,12 @@
#include <sys/wait.h> /* For WNOHANG */
#endif
+#ifdef HAVE_GETPRIORITY
+#ifndef PRIO_PROCESS
+#include <sys/resource.h>
+#endif /* !PRIO_PROCESS */
+#endif /* HAVE_GETPRIORITY */
+
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif