Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 May 2024 17:40:24 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 27326f895e5f - main - cross-build: string.h uses mode_t, so we need sys/types.h
Message-ID:  <202405261740.44QHeO5X085509@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=27326f895e5f16e58c9d619b9bd5742949ccb3c5

commit 27326f895e5f16e58c9d619b9bd5742949ccb3c5
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-05-26 17:39:10 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-05-26 17:39:10 +0000

    cross-build: string.h uses mode_t, so we need sys/types.h
    
    string.h defines strmode with a mode_t argument. POSIX states that one
    must include sys/types.h to get mode_t, so do that here. This makes musl
    happier. We know that sys/types.h will include sys/cdefs.h, so just
    replace the latter with the former.
    
    Co-authored-by:         Val Packett <val@packett.cool>
    Sponsored by:           Netflix
    Pull Request:           https://github.com/freebsd/freebsd-src/pull/1066
    Reviewed by:            val_packett.cool
    Differential Revision:  https://reviews.freebsd.org/D45353
---
 tools/build/cross-build/include/linux/string.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/build/cross-build/include/linux/string.h b/tools/build/cross-build/include/linux/string.h
index 8fac9e0fe083..b6d2fe488d40 100644
--- a/tools/build/cross-build/include/linux/string.h
+++ b/tools/build/cross-build/include/linux/string.h
@@ -44,7 +44,7 @@
  */
 #include <stdlib.h>
 
-#include <sys/cdefs.h>
+#include <sys/types.h>
 
 __BEGIN_DECLS
 #if !defined(__GLIBC__) || \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202405261740.44QHeO5X085509>