]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-135108: Fix utmp.h inclusion in posixmodule.c on NetBSD (GH-135109) (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 4 Jun 2025 13:16:39 +0000 (15:16 +0200)
committerGitHub <noreply@github.com>
Wed, 4 Jun 2025 13:16:39 +0000 (13:16 +0000)
(cherry picked from commit 5b3865418ceb1448bfbf15cddf52c900cd5882a3)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Modules/posixmodule.c

index 03ab8dbdfb1e50ee2a0cdbc16dac404f560d1cbb..6e219271ae9e01d4b1a94ee6817a8d35fbcb1570 100644 (file)
@@ -8806,14 +8806,14 @@ os_ptsname_impl(PyObject *module, int fd)
 #if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_LOGIN_TTY) || defined(HAVE_DEV_PTMX)
 #ifdef HAVE_PTY_H
 #include <pty.h>
-#ifdef HAVE_UTMP_H
-#include <utmp.h>
-#endif /* HAVE_UTMP_H */
 #elif defined(HAVE_LIBUTIL_H)
 #include <libutil.h>
 #elif defined(HAVE_UTIL_H)
 #include <util.h>
 #endif /* HAVE_PTY_H */
+#ifdef HAVE_UTMP_H
+#include <utmp.h>
+#endif /* HAVE_UTMP_H */
 #ifdef HAVE_STROPTS_H
 #include <stropts.h>
 #endif