git: 18cf1e502321 - main - cross-build: Define DEFFILEMODE and ALLPERMS if not defined
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 25 Jul 2024 02:47:03 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=18cf1e502321f98f2391244c4b9de84fcaf11371
commit 18cf1e502321f98f2391244c4b9de84fcaf11371
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-07-25 02:46:49 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-07-25 02:47:26 +0000
cross-build: Define DEFFILEMODE and ALLPERMS if not defined
GLIBC defines these, but MUSL does not. FreeBSD's bootstrap code uses
these defines, so define them if they aren't yet defined.
Co-authored-by: Val Packett <val@packett.cool>
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/1066
Differential Revision: https://reviews.freebsd.org/D45375
---
tools/build/cross-build/include/linux/sys/stat.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/build/cross-build/include/linux/sys/stat.h b/tools/build/cross-build/include/linux/sys/stat.h
index fa40b7e747b6..5937920ce461 100644
--- a/tools/build/cross-build/include/linux/sys/stat.h
+++ b/tools/build/cross-build/include/linux/sys/stat.h
@@ -58,5 +58,13 @@
#define S_ISTXT S_ISVTX
#endif
+#ifndef DEFFILEMODE
+#define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
+#endif
+
+#ifndef ALLPERMS
+#define ALLPERMS (S_ISUID | S_ISGID | S_ISTXT | S_IRWXU | S_IRWXG | S_IRWXO)
+#endif
+
/* This include is needed for OpenZFS bootstrap */
#include <sys/mount.h>