Module Name:    src
Committed By:   lukem
Date:           Thu May 25 13:18:44 UTC 2023

Modified Files:
        src/external/cddl/osnet/sys/sys: opentypes.h

Log Message:
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...


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/cddl/osnet/sys/sys/opentypes.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/sys/sys/opentypes.h
diff -u src/external/cddl/osnet/sys/sys/opentypes.h:1.6 src/external/cddl/osnet/sys/sys/opentypes.h:1.7
--- src/external/cddl/osnet/sys/sys/opentypes.h:1.6	Thu Apr 15 07:00:50 2021
+++ src/external/cddl/osnet/sys/sys/opentypes.h	Thu May 25 13:18:44 2023
@@ -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

Reply via email to