Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/sys/sys osnet: on macOS, use <mach/boole...



details:   https://anonhg.NetBSD.org/src/rev/e6de9d6035f4
branches:  trunk
changeset: 375997:e6de9d6035f4
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu May 25 13:18:44 2023 +0000

description:
osnet: on macOS, use <mach/boolean.h> for boolean_t

macOS/x86_64 defines boolean_t as 'unsigned int' not 'int',
which causes a build issue with tools/ctfmerge on that host
after my recent fixes for macOS semaphores.
So use the <mach/boolean.h> instead of a local typedef ifdef __APPLE__.

May fix a macOS/x86_64 build issue reported by cjep@.
Builds fine on NetBSD/amd64 or macOS/arm.

Note: this compat stuff is clunky, and based on the commit log,
annoyingly error prone. A newer sync of osnet from upstream /may/
improve a lot of these compat typedef workarounds for solaris types...

diffstat:

 external/cddl/osnet/sys/sys/opentypes.h |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 454cb60c99eb -r e6de9d6035f4 external/cddl/osnet/sys/sys/opentypes.h
--- a/external/cddl/osnet/sys/sys/opentypes.h   Thu May 25 12:57:37 2023 +0000
+++ b/external/cddl/osnet/sys/sys/opentypes.h   Thu May 25 13:18:44 2023 +0000
@@ -37,8 +37,12 @@ typedef id_t         ctid_t;
 #define        B_FALSE 0
 #define        B_TRUE  1
 #ifndef _KERNEL
+#if defined(__APPLE__)
+#include <mach/boolean.h>
+#else
 typedef int            boolean_t;
 #endif
+#endif
 
 #ifndef __defined_hr_t
 #define __defined_hr_t



Home | Main Index | Thread Index | Old Index