summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS.d/next/Build/2020-05-01-23-44-31.bpo-11102.Fw9zeS.rst2
-rw-r--r--Modules/posixmodule.c9
-rwxr-xr-xconfigure1
-rw-r--r--configure.ac1
4 files changed, 9 insertions, 4 deletions
diff --git a/Misc/NEWS.d/next/Build/2020-05-01-23-44-31.bpo-11102.Fw9zeS.rst b/Misc/NEWS.d/next/Build/2020-05-01-23-44-31.bpo-11102.Fw9zeS.rst
new file mode 100644
index 0000000..6477538
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2020-05-01-23-44-31.bpo-11102.Fw9zeS.rst
@@ -0,0 +1,2 @@
+The :func:`os.major`, :func:`os.makedev`, and :func:`os.minor` functions are
+now available on HP-UX v3.
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index c635fd4..f4a1853 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -236,15 +236,16 @@ corresponding Unix manual entries for more information on calls.");
# include <sys/uio.h>
#endif
+#ifdef HAVE_SYS_TYPES_H
+/* Should be included before <sys/sysmacros.h> on HP-UX v3 */
+# include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+
#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 */
-
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif /* HAVE_SYS_STAT_H */
diff --git a/configure b/configure
index 6d65d3a..3322b7a6 100755
--- a/configure
+++ b/configure
@@ -21805,6 +21805,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#if defined(MAJOR_IN_MKDEV)
#include <sys/mkdev.h>
#elif defined(MAJOR_IN_SYSMACROS)
+#include <sys/types.h>
#include <sys/sysmacros.h>
#else
#include <sys/types.h>
diff --git a/configure.ac b/configure.ac
index bfdabc4..13a6d74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5102,6 +5102,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#if defined(MAJOR_IN_MKDEV)
#include <sys/mkdev.h>
#elif defined(MAJOR_IN_SYSMACROS)
+#include <sys/types.h>
#include <sys/sysmacros.h>
#else
#include <sys/types.h>