git: 481d5a489164 - main - linux.h: don't redefine lower_32_bits if already defined

From: Warner Losh <imp_at_FreeBSD.org>
Date: Tue, 15 Oct 2024 10:50:42 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=481d5a4891648f0a6979a48689cc16fca80d4ab6

commit 481d5a4891648f0a6979a48689cc16fca80d4ab6
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-10-15 04:53:55 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-10-15 10:50:44 +0000

    linux.h: don't redefine lower_32_bits if already defined
    
    systrace.c fails to build if we're using a common compiler.h for both
    openzfs and linuxkpi. The issue is easy enough to fix: don't redefined
    lower_32_bits if it's already defined in linux.h, since it's the least
    'standardized'. This will allow systrace.c to build using an equivalent
    macro.
    
    MFC After: 3 days
    Sponsored by: Netflix
---
 sys/compat/linux/linux.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/compat/linux/linux.h b/sys/compat/linux/linux.h
index 5a0d6e0b68c5..6d276b8a69f4 100644
--- a/sys/compat/linux/linux.h
+++ b/sys/compat/linux/linux.h
@@ -350,7 +350,9 @@ struct l_statx {
 #define	LINUX_ST_RELATIME		0x1000	/* No native analogue */
 #define	LINUX_ST_NOSYMFOLLOW		0x2000
 
+#ifndef lower_32_bits
 #define	lower_32_bits(n)	((uint32_t)((n) & 0xffffffff))
+#endif
 
 #ifdef KTRACE
 #define	linux_ktrsigset(s, l)	\