openssh: Include <fcntl.h> explicitly in includes.h

This was previously included due to nested includes in Heimdal's
headers.  Without this, the build fails with an error due to redefining
AT_FDCWD.

clang:

In file included from crypto/openssh/sshd-session.c:46:
/usr/obj/.../tmp/usr/include/fcntl.h:232:9: error: 'AT_FDCWD' macro redefined [-Werror,-Wmacro-redefined]
  232 | #define AT_FDCWD                -100
      |         ^
crypto/openssh/openbsd-compat/bsd-misc.h:69:10: note: previous definition is here
   69 | # define AT_FDCWD (-2)
      |          ^

GCC (can't be disabled):

In file included from crypto/openssh/sshd-session.c:46:
sys/sys/fcntl.h:232:9: error: "AT_FDCWD" redefined [-Werror]
  232 | #define AT_FDCWD                -100
      |         ^~~~~~~~
In file included from crypto/openssh/openbsd-compat/openbsd-compat.h:218,
                 from crypto/openssh/includes.h:173,
                 from crypto/openssh/sshd-session.c:30:
openssh/openbsd-compat/bsd-misc.h:69:10: note: this is the location of the previous definition
   69 | # define AT_FDCWD (-2)
      |          ^~~~~~~~

Reviewed by:	des
Differential Revision:	https://reviews.freebsd.org/D51809
This commit is contained in:
John Baldwin
2025-08-08 13:43:36 -04:00
parent 5090ea716b
commit 7de6d9d9b6
+3
View File
@@ -34,6 +34,9 @@
#ifdef HAVE_ENDIAN_H
# include <endian.h>
#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
#ifdef HAVE_TTYENT_H
# include <ttyent.h>
#endif