wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix build on FreeBSD 13 after removal from base
@ 2021-03-18 21:02 Evilham
  2021-03-19 17:06 ` Jason A. Donenfeld
  0 siblings, 1 reply; 2+ messages in thread
From: Evilham @ 2021-03-18 21:02 UTC (permalink / raw)
  To: wireguard

\o Hello,

noticed that after if_wg removal from stable/13 following patch is 
needed for compiling the module.

I'm currently lacking a 14/CURRENT machine to assert that the 
module compiles with these changes, but from checking the branch, 
it looks like these definitions are there already, I wouldn't 
think versions pre-13 should be affected by this.

Cheers and thank you for the efforts and... handling of things.

---
 src/compat.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/compat.h b/src/compat.h
index 6126e26..bc29c01 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -7,6 +7,9 @@
  */

 #include <sys/param.h>
+#if __FreeBSD_version < 1400000
+#include <sys/smp.h>
+#include <sys/gtaskqueue.h>
 #if __FreeBSD_version < 1300000
 #define VIMAGE

@@ -18,8 +21,6 @@
 #include <sys/malloc.h>
 #include <sys/proc.h>
 #include <sys/lock.h>
-#include <sys/smp.h>
-#include <sys/gtaskqueue.h>
 #include <sys/socketvar.h>
 #include <sys/protosw.h>
 #include <net/vnet.h>
@@ -39,6 +40,7 @@

 #undef atomic_load_ptr
 #define atomic_load_ptr(p) (*(volatile __typeof(*p) *)(p))
+#endif /* __FreeBSD_version < 1300000 */

 struct taskqgroup_cpu {
 	LIST_HEAD(, grouptask)	tgc_tasks;
@@ -67,7 +69,7 @@ static inline void taskqgroup_drain_all(struct 
taskqgroup *tqg)
 		gtaskqueue_drain_all(q);
 	}
 }
-#endif
+#endif /* __FreeBSD_version < 1400000 */

 #if __FreeBSD_version < 1202000
 static inline uint32_t arc4random_uniform(uint32_t bound)
--
2.30.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-19 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 21:02 [PATCH] Fix build on FreeBSD 13 after removal from base Evilham
2021-03-19 17:06 ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).