[Python-checkins] cpython: Issue #27776: include process.h on Windows for getpid()

victor.stinner python-checkins at python.org
Tue Sep 6 20:03:57 EDT 2016


https://hg.python.org/cpython/rev/ebbfc053360a
changeset:   103178:ebbfc053360a
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Tue Sep 06 17:03:03 2016 -0700
summary:
  Issue #27776: include process.h on Windows for getpid()

files:
  Modules/_randommodule.c |  3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -68,6 +68,9 @@
 
 #include "Python.h"
 #include <time.h>               /* for seeding to current time */
+#ifdef HAVE_PROCESS_H
+#  include <process.h>          /* needed for getpid() */
+#endif
 
 /* Period parameters -- These are all magic.  Don't change. */
 #define N 624

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list