diff options
author | Warner Losh <imp@FreeBSD.org> | 2024-07-25 02:46:35 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2024-07-25 02:47:26 +0000 |
commit | 4a0b7955fd727754b853f6a346b8379e21bcb81f (patch) | |
tree | af74a5ae02e35822ce64d6f6b8f2b82b4f620042 | |
parent | f68c4b4746f2fd24604374106c6bfc590e317f25 (diff) | |
download | src-4a0b7955fd727754b853f6a346b8379e21bcb81f.tar.gz src-4a0b7955fd727754b853f6a346b8379e21bcb81f.zip |
cross-build: Move fcntl.h workaround to Linux specific file
Move the cdefs.h inclusion to the Linux specific file. Either place will
work, but it makes more sense to do it in the Linux specific file since
it's a Linux specific workaround.
Fixes: 4300e053618f
Suggested by: arichards, jrtc27
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D45373
-rw-r--r-- | tools/build/cross-build/include/linux/fcntl.h | 7 | ||||
-rw-r--r-- | tools/build/fcntl.h | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/build/cross-build/include/linux/fcntl.h b/tools/build/cross-build/include/linux/fcntl.h index aafcfe43a325..e5718ce5e3ed 100644 --- a/tools/build/cross-build/include/linux/fcntl.h +++ b/tools/build/cross-build/include/linux/fcntl.h @@ -44,3 +44,10 @@ #include "__unused_workaround_end.h" #include <sys/file.h> + +/* + * On FreeBSD fcntl.h indirectly brings in cdefs.h. On Linux with musl, it does + * not. It's needed in our fcntl.h for the cross build since we use + * __BEGIN_DECLS and __END_DECLS from it there. + */ +#include <sys/cdefs.h> diff --git a/tools/build/fcntl.h b/tools/build/fcntl.h index f59f5f7fb20a..6aaf3eef2804 100644 --- a/tools/build/fcntl.h +++ b/tools/build/fcntl.h @@ -29,13 +29,6 @@ #include_next <fcntl.h> -/* - * On FreeBSD fcntl.h indirectly brings in cdefs.h. On Linux with musl, it does - * not. Unconditionally inlude it here since there's no harm in including it - * multiple times since we use __BEGIN_DECLS and __END_DECLS from it below. - */ -#include <sys/cdefs.h> - struct spacectl_range { off_t r_offset; off_t r_len; |