Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167836229
D55202.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D55202.diff
View Options
diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c
--- a/sys/dev/mfi/mfi.c
+++ b/sys/dev/mfi/mfi.c
@@ -52,11 +52,12 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include "opt_mfi.h"
-#include <sys/param.h>
#include <sys/systm.h>
+#ifdef COMPAT_FREEBSD32
+#include <sys/abi_compat.h>
+#endif
#include <sys/sysctl.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
diff --git a/sys/sys/abi_compat.h b/sys/sys/abi_compat.h
--- a/sys/sys/abi_compat.h
+++ b/sys/sys/abi_compat.h
@@ -4,11 +4,6 @@
* Copyright (c) 2001 Doug Rabson
* All rights reserved.
*
- * Copyright 2026 The FreeBSD Foundation
- *
- * Portions of this software were developed by Konstantin Belousov
- * under sponsorship from the FreeBSD Foundation.
- *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -34,35 +29,12 @@
#ifndef _ABI_COMPAT_H_
#define _ABI_COMPAT_H_
-#include <sys/_types.h>
+#include <sys/abi_types.h>
/*
* Helper types and macros for translating objects between different ABIs.
*/
-/*
- * i386 is the only arch with a 32-bit time_t.
- * Also it is the only arch with (u)int64_t having 4-bytes alignment.
- */
-typedef struct {
-#ifdef __amd64__
- __uint32_t val[2];
-#else
- __uint64_t val;
-#endif
-} freebsd32_uint64_t;
-
-#if __SIZEOF_LONG__ == 8
-#if defined __amd64__
-typedef __int32_t time32_t;
-#else
-typedef __int64_t time32_t;
-#endif
-#else
-typedef __int32_t time32_t;
-#endif
-#define __HAVE_TIME32_T
-
#define PTRIN(v) (void *)(uintptr_t)(v)
#define PTROUT(v) (uintptr_t)(v)
diff --git a/sys/sys/abi_types.h b/sys/sys/abi_types.h
new file mode 100644
--- /dev/null
+++ b/sys/sys/abi_types.h
@@ -0,0 +1,39 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright 2026 The FreeBSD Foundation
+ *
+ * Portions of this software were developed by Konstantin Belousov
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ */
+
+#ifndef _ABI_TYPES_H_
+#define _ABI_TYPES_H_
+
+#include <sys/_types.h>
+
+/*
+ * i386 is the only arch with a 32-bit time_t.
+ * Also it is the only arch with (u)int64_t having 4-bytes alignment.
+ */
+typedef struct {
+#ifdef __amd64__
+ __uint32_t val[2];
+#else
+ __uint64_t val;
+#endif
+} freebsd32_uint64_t;
+
+#if __SIZEOF_LONG__ == 8
+#if defined __amd64__
+typedef __int32_t time32_t;
+#else
+typedef __int64_t time32_t;
+#endif
+#else
+typedef __int32_t time32_t;
+#endif
+#define __HAVE_TIME32_T
+
+#endif
diff --git a/sys/sys/event.h b/sys/sys/event.h
--- a/sys/sys/event.h
+++ b/sys/sys/event.h
@@ -104,7 +104,7 @@
#endif
#if defined(_WANT_KEVENT32) || defined(_KERNEL)
-#include <sys/abi_compat.h>
+#include <sys/abi_types.h>
struct kevent32 {
__uint32_t ident; /* identifier for this event */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Aug 25, 9:35 PM (3 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37252378
Default Alt Text
D55202.diff (2 KB)
Attached To
Mode
D55202: sys/event.h: reduce namespace pollution from sys/abi_compat.h
Attached
Detach File
Event Timeline
Log In to Comment