Commit 49ce41c
committed
libc: gate aarch64 atomic.h kernel-only includes so ZFS userspace builds
libc/arch/aarch64/atomic.h pulls in OSv kernel-only headers (the
FreeBSD-derived machine/atomic.h and the bsd/cddl opensolaris sys/types.h),
which are only on the include path for kernel/bsd objects. Userspace
translation units that resolve <atomic.h> to this file (the OpenZFS
libspl/libzfs sources on aarch64) do not have them and do not need them.
Gate those includes on the kernel build and use the compiler atomic builtin
in the userspace path. The x86_64 variant has no such includes, so this is
aarch64-only and leaves x86_64 byte-identical.1 parent 73f1e53 commit 49ce41c
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
12 | 22 | | |
13 | 23 | | |
| 24 | + | |
14 | 25 | | |
15 | 26 | | |
16 | 27 | | |
| |||
26 | 37 | | |
27 | 38 | | |
28 | 39 | | |
| 40 | + | |
29 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
30 | 46 | | |
31 | 47 | | |
32 | 48 | | |
| |||
0 commit comments