From a787e5f31d53cb8458ebc34b341886db4f8f88dc Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Sat, 30 Jul 2016 14:14:12 +0300 Subject: [PATCH] Issue #27652: Expose ESHUTDOWN conditionally ESHUTDOWN is also exposed conditionally in Modules/errnomodule.c. Patch by Ed Schouten. --- Objects/exceptions.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Objects/exceptions.c b/Objects/exceptions.c index d97d569edb9..f829d32c996 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -2604,7 +2604,9 @@ _PyExc_Init(PyObject *bltinmod) ADD_ERRNO(BlockingIOError, EWOULDBLOCK); POST_INIT(BrokenPipeError); ADD_ERRNO(BrokenPipeError, EPIPE); +#ifdef ESHUTDOWN ADD_ERRNO(BrokenPipeError, ESHUTDOWN); +#endif POST_INIT(ChildProcessError); ADD_ERRNO(ChildProcessError, ECHILD); POST_INIT(ConnectionAbortedError);