-
Notifications
You must be signed in to change notification settings - Fork 545
Open
Description
Getting the following error. NETMAP_LINUX_HAVE_AX25PTR is defined.
=== compile log relevant===
sys/dev/netmap/netmap_kern.h:1643:18: error: assignment to ‘struct ax25_dev *’ from incompatible pointer type ‘struct netmap_adapter *’ [-Wincompatible-pointer-types]
1643 | WNA(ifp) = na;
Probably our build system have --Wincompatible-pointer-types throw error. Any good way to fix this other than ignoring -Werror?
overloading ax25_ptr is causing build failures on newer kernels I am guessing. possibly more stricter compile check in 6.12.17.
This is the workaround I currently have
diff --git a/sys/dev/netmap/netmap_kern.h b/sys/dev/netmap/netmap_kern.h
index fea2f820..68c93731 100644
--- a/sys/dev/netmap/netmap_kern.h
+++ b/sys/dev/netmap/netmap_kern.h
@@ -1640,12 +1640,12 @@ extern int netmap_generic_txqdisc;
((uint32_t)(uintptr_t)NA(ifp) ^ NA(ifp)->magic) == NETMAP_MAGIC )
#define NM_ATTACH_NA(ifp, na) do { \
- WNA(ifp) = na; \
+ WNA(ifp) = (void *)na; \
if (NA(ifp)) \
NA(ifp)->magic = \
((uint32_t)(uintptr_t)NA(ifp)) ^ NETMAP_MAGIC; \
} while(0)
-#define NM_RESTORE_NA(ifp, na) WNA(ifp) = na;
+#define NM_RESTORE_NA(ifp, na) WNA(ifp) = (void *)na;
#define NM_DETACH_NA(ifp) do { WNA(ifp) = NULL; } while (0)
#define NM_NA_CLASH(ifp) (NA(ifp) && !NM_NA_VALID(ifp))Metadata
Metadata
Assignees
Labels
No labels