Browse Source
- 15-CURRENT ditches the CLLADDR macro; replace it with LLADDR - cpu_in_cksum.S is mediocre assembly code that only works on amd64. Disable its use; the compiler will do just as good of a job. - assume we always have atomic_* functions on FreeBSD, even if they are not macros (as is the case on armv7) Approved by: portmgr (build fix blanket) MFH: 2025Q2 See also: D50065overlay

4 changed files with 51 additions and 2 deletions
@ -0,0 +1,23 @@ |
|||
--- gen/compat.h.orig 2024-05-27 06:59:46 UTC |
|||
+++ gen/compat.h |
|||
@@ -48,6 +48,7 @@ |
|||
#define ETHERTYPE_FLOWCONTROL 0x8808 |
|||
#endif |
|||
|
|||
+#if !defined(__FreeBSD__) || defined(__i386__) |
|||
#ifndef atomic_fetchadd_32 |
|||
#define atomic_fetchadd_32(t, v) __atomic_fetch_add(t, v, __ATOMIC_CONSUME) |
|||
#endif |
|||
@@ -67,10 +68,11 @@ atomic_cmpset_32(volatile uint32_t *p, uint32_t cmpval |
|||
bool ret = __atomic_compare_exchange_n(p, &cmpval, newval, false, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED); |
|||
return ret ? 1 : 0; |
|||
} |
|||
-#endif |
|||
+#endif /* !defined(__FreeBSD__) || defined(__i386__) */ |
|||
|
|||
#ifndef __unused |
|||
#define __unused __attribute__((unused)) |
|||
+#endif |
|||
#endif |
|||
|
|||
#endif /* _COMPAT_H_ */ |
@ -0,0 +1,14 @@ |
|||
--- gen/util.c.orig 2025-05-05 17:12:32 UTC |
|||
+++ gen/util.c |
|||
@@ -351,7 +351,11 @@ getiflinkaddr(const char *ifname, struct ether_addr *a |
|||
if ((sdl->sdl_type == IFT_ETHER) && |
|||
(sdl->sdl_alen == ETHER_ADDR_LEN)) { |
|||
|
|||
+#ifdef CLLADDR |
|||
memcpy(addr, (const struct ether_addr *)CLLADDR(sdl), ETHER_ADDR_LEN); |
|||
+#else |
|||
+ memcpy(addr, (const struct ether_addr *)LLADDR(sdl), ETHER_ADDR_LEN); |
|||
+#endif |
|||
found = 1; |
|||
break; |
|||
} |
Loading…
Reference in new issue