summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2017-09-05 13:53:09 (GMT)
committerGitHub <noreply@github.com>2017-09-05 13:53:09 (GMT)
commit75b961869a1184895c9d5bf41a57f3c985622662 (patch)
treee997a3f2612706c48e6a401265d9aa069bd62327 /Modules
parentc941e6238ab2a8caad11fe17d4723a5d5e7a2d76 (diff)
downloadcpython-75b961869a1184895c9d5bf41a57f3c985622662.zip
cpython-75b961869a1184895c9d5bf41a57f3c985622662.tar.gz
cpython-75b961869a1184895c9d5bf41a57f3c985622662.tar.bz2
bpo-31343: Include sys/sysmacros.h (#3318)
Include sys/sysmacros.h for major(), minor(), and makedev(). GNU C libray plans to remove the functions from sys/types.h. Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index e8138d5..7b57d8b 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -56,6 +56,11 @@ corresponding Unix manual entries for more information on calls.");
#include <sys/uio.h>
#endif
+#ifdef HAVE_SYS_SYSMACROS_H
+/* GNU C Library: major(), minor(), makedev() */
+#include <sys/sysmacros.h>
+#endif
+
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */