From 37cda2837c004e743e9262e2e0ea409766df2a09 Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Wed, 27 Jul 2022 09:48:32 +0200 Subject: [PATCH] linuxkpi: Add compat_ptr and ptr_to_compat Needed by drm-kmod. Obtained from: drm-kmod Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D36016 --- sys/compat/linuxkpi/common/include/linux/compat.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/compat.h b/sys/compat/linuxkpi/common/include/linux/compat.h index 5e4dd1daf67..b6bb5e8ed24 100644 --- a/sys/compat/linuxkpi/common/include/linux/compat.h +++ b/sys/compat/linuxkpi/common/include/linux/compat.h @@ -58,4 +58,7 @@ linux_set_current_flags(struct thread *td, int flags) return (0); } +#define compat_ptr(x) ((void *)(uintptr_t)x) +#define ptr_to_compat(x) ((uintptr_t)x) + #endif /* _LINUXKPI_LINUX_COMPAT_H_ */