summaryrefslogtreecommitdiff
path: root/net-mgmt/ipgen/files/patch-gen_compat.h
blob: 373d113da027806d3b023599a4e6c20a5a0ce112 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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_ */