<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/tools/build/cross-build/include/linux, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Add __unused workaround for linux/sys/types.h</title>
<updated>2026-03-07T07:51:14+00:00</updated>
<author>
<name>Perdixky</name>
<email>3293789706@qq.com</email>
</author>
<published>2026-03-05T12:26:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9f2eb94736eaf9a86cef75fe54c43c64132ec312'/>
<id>9f2eb94736eaf9a86cef75fe54c43c64132ec312</id>
<content type='text'>
Signed-off-by: Perdixky &lt;3293789706@qq.com&gt;
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2063
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Perdixky &lt;3293789706@qq.com&gt;
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2063
</pre>
</div>
</content>
</entry>
<entry>
<title>fix cross build after expand_number type change</title>
<updated>2025-08-03T10:03:14+00:00</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2025-08-03T09:48:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=630efff12879f64da5338abb08b04710f8c0f2cb'/>
<id>630efff12879f64da5338abb08b04710f8c0f2cb</id>
<content type='text'>
Fixes:		2e0caa7c7e14 ("libutil: Really fix expand_number(3)")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes:		2e0caa7c7e14 ("libutil: Really fix expand_number(3)")
</pre>
</div>
</content>
</entry>
<entry>
<title>cross-build: Provide real fflagstostr/strtofflags on Linux</title>
<updated>2025-05-06T16:58:10+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2025-05-06T16:58:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=52c8e24cc03b6a109f678a3a72ef5c88cb45cc07'/>
<id>52c8e24cc03b6a109f678a3a72ef5c88cb45cc07</id>
<content type='text'>
These are used by mtree and makefs, so in order to be able to set schg
on /var/empty in METALOG and set schg on various files and directories
in the resulting disk images we need to have a real implementation
rather than always giving no flags.

Ideally mtree wouldn't rely on round-tripping the textual flags field
via the "native" flags encoding using these functions, and ideally
makefs wouldn't rely on the "native" flags encoding matching FreeBSD's,
but in practice macOS's schg is the same and we can pretend Linux has
the same.

This fixes Linux-produced disk images lacking schg on any files or
directories, and Linux-produced distribution tarballs lacking schg on
/var/empty (note though that they do set schg on files, as install
already preserves file flags on Linux).

Reviewed by:	emaste, markj
Differential Revision:	https://reviews.freebsd.org/D50080
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are used by mtree and makefs, so in order to be able to set schg
on /var/empty in METALOG and set schg on various files and directories
in the resulting disk images we need to have a real implementation
rather than always giving no flags.

Ideally mtree wouldn't rely on round-tripping the textual flags field
via the "native" flags encoding using these functions, and ideally
makefs wouldn't rely on the "native" flags encoding matching FreeBSD's,
but in practice macOS's schg is the same and we can pretend Linux has
the same.

This fixes Linux-produced disk images lacking schg on any files or
directories, and Linux-produced distribution tarballs lacking schg on
/var/empty (note though that they do set schg on files, as install
already preserves file flags on Linux).

Reviewed by:	emaste, markj
Differential Revision:	https://reviews.freebsd.org/D50080
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/build/cross-build: Don't include sys/uio.h from linux limits.h</title>
<updated>2024-10-18T20:39:37+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2024-10-18T20:39:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0bdf2535d4f8a571cb6d230f2f19eb20a452a4f8'/>
<id>0bdf2535d4f8a571cb6d230f2f19eb20a452a4f8</id>
<content type='text'>
This creates a circular dependency for OpenZFS's libspl in sys/uio.h,
and it shouldn't be needed since the system limits.h already defines
IOV_MAX, so delete it, and unconditionally assert that to be the case.
Otherwise the re-include of libspl's sys/uio.h tries to use PAGESIZE
before it has been defined by OpenZFS's own sys/param.h.

Fixes:		7a7741af18d6 ("zfs: merge openzfs/zfs@b10992582")
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This creates a circular dependency for OpenZFS's libspl in sys/uio.h,
and it shouldn't be needed since the system limits.h already defines
IOV_MAX, so delete it, and unconditionally assert that to be the case.
Otherwise the re-include of libspl's sys/uio.h tries to use PAGESIZE
before it has been defined by OpenZFS's own sys/param.h.

Fixes:		7a7741af18d6 ("zfs: merge openzfs/zfs@b10992582")
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>cross-build: Define DEFFILEMODE and ALLPERMS if not defined</title>
<updated>2024-07-25T02:47:26+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-07-25T02:46:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=18cf1e502321f98f2391244c4b9de84fcaf11371'/>
<id>18cf1e502321f98f2391244c4b9de84fcaf11371</id>
<content type='text'>
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 &lt;val@packett.cool&gt;
Sponsored by:		Netflix
Pull Request:		https://github.com/freebsd/freebsd-src/pull/1066
Differential Revision:	https://reviews.freebsd.org/D45375
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;val@packett.cool&gt;
Sponsored by:		Netflix
Pull Request:		https://github.com/freebsd/freebsd-src/pull/1066
Differential Revision:	https://reviews.freebsd.org/D45375
</pre>
</div>
</content>
</entry>
<entry>
<title>cross-build: Move fcntl.h workaround to Linux specific file</title>
<updated>2024-07-25T02:47:26+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-07-25T02:46:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4a0b7955fd727754b853f6a346b8379e21bcb81f'/>
<id>4a0b7955fd727754b853f6a346b8379e21bcb81f</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>cross-build: Define __*int*_t and include sys/cdefs.h</title>
<updated>2024-05-26T17:39:18+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-05-26T17:39:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3c5f0da5106bee21ab3726f608b5c377da92a733'/>
<id>3c5f0da5106bee21ab3726f608b5c377da92a733</id>
<content type='text'>
FreeBSD assumes that sys/types.h includes sys/cdefs.h, so add it here.
FreeBSD also needs __*int*_t defined for software we bootstrap (a lot of
it). GLIBC defines these, but musl does not, so we have to define them
here, even though it looks backwards. There's no good #define to key off
of, so use !defined GLIBC since on Linux defacto there's only two libc
implementations.

Co-authored-by:		Val Packett &lt;val@packett.cool&gt;
Sponsored by:		Netflix
Pull Request:		https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by:		val_packett.cool
Differential Revision:	https://reviews.freebsd.org/D45354
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FreeBSD assumes that sys/types.h includes sys/cdefs.h, so add it here.
FreeBSD also needs __*int*_t defined for software we bootstrap (a lot of
it). GLIBC defines these, but musl does not, so we have to define them
here, even though it looks backwards. There's no good #define to key off
of, so use !defined GLIBC since on Linux defacto there's only two libc
implementations.

Co-authored-by:		Val Packett &lt;val@packett.cool&gt;
Sponsored by:		Netflix
Pull Request:		https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by:		val_packett.cool
Differential Revision:	https://reviews.freebsd.org/D45354
</pre>
</div>
</content>
</entry>
<entry>
<title>cross-build: string.h uses mode_t, so we need sys/types.h</title>
<updated>2024-05-26T17:39:10+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-05-26T17:39:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=27326f895e5f16e58c9d619b9bd5742949ccb3c5'/>
<id>27326f895e5f16e58c9d619b9bd5742949ccb3c5</id>
<content type='text'>
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 &lt;val@packett.cool&gt;
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;val@packett.cool&gt;
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
</pre>
</div>
</content>
</entry>
<entry>
<title>cross-build: Include sys/types.h from sys/param.h</title>
<updated>2024-05-26T17:39:02+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-05-26T17:39:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=76efd90ab093244634b0e6db450f1b0cca0b3263'/>
<id>76efd90ab093244634b0e6db450f1b0cca0b3263</id>
<content type='text'>
FreeBSD has a style(9) enforced assumption that sys/param.h includes
sys/types.h. However, Linux under musl doesn't do this so go ahead and
explicitly include it here. It won't hurt on the glibc systems, and
helps musl.

Co-authored-by:		Val Packett &lt;val@packett.cool&gt;
Sponsored by:		Netflix
Pull Request:		https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by:		val_packett.cool
Differential Revision:	https://reviews.freebsd.org/D45352
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FreeBSD has a style(9) enforced assumption that sys/param.h includes
sys/types.h. However, Linux under musl doesn't do this so go ahead and
explicitly include it here. It won't hurt on the glibc systems, and
helps musl.

Co-authored-by:		Val Packett &lt;val@packett.cool&gt;
Sponsored by:		Netflix
Pull Request:		https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by:		val_packett.cool
Differential Revision:	https://reviews.freebsd.org/D45352
</pre>
</div>
</content>
</entry>
<entry>
<title>cross-tools: Document a rather bizarre looking construct</title>
<updated>2024-05-26T17:38:46+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-05-26T17:38:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=917c0541e4cc60fc4ea6fe434dabe0699ca7c2fd'/>
<id>917c0541e4cc60fc4ea6fe434dabe0699ca7c2fd</id>
<content type='text'>
On Linux, stddef.h will define __size_t to something when size_t is
defined. On FreeBSD, __size_t is an actual typedef which we need for
other parts of the system. If __size_t isn't defined, that tells us we
need to define the fallback __size_t typedef (if it is defined, then we
can't easily redefine it without issues because glob.h will define it to
something different than stddef.h defines it). Add a comment to this
effect.

Sponsored by:		Netflix
Reviewed by:		val_packett.cool
Differential Revision:	https://reviews.freebsd.org/D45350
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Linux, stddef.h will define __size_t to something when size_t is
defined. On FreeBSD, __size_t is an actual typedef which we need for
other parts of the system. If __size_t isn't defined, that tells us we
need to define the fallback __size_t typedef (if it is defined, then we
can't easily redefine it without issues because glob.h will define it to
something different than stddef.h defines it). Add a comment to this
effect.

Sponsored by:		Netflix
Reviewed by:		val_packett.cool
Differential Revision:	https://reviews.freebsd.org/D45350
</pre>
</div>
</content>
</entry>
</feed>
