git: b19f74cfc43b - stable/14 - openssh: Include <fcntl.h> explicitly in includes.h
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Jan 2026 19:43:37 UTC
The branch stable/14 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=b19f74cfc43b2b555875fa8be35ae23cab6e6096
commit b19f74cfc43b2b555875fa8be35ae23cab6e6096
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-08-08 17:43:36 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-01-20 19:42:08 +0000
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
(cherry picked from commit 7de6d9d9b6bd8b1cd5e190cf4f12df498b34a646)
---
crypto/openssh/includes.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/crypto/openssh/includes.h b/crypto/openssh/includes.h
index 8f933568d337..96cddbc26089 100644
--- a/crypto/openssh/includes.h
+++ b/crypto/openssh/includes.h
@@ -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