Development discussion of WireGuard
 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	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix build on FreeBSD 13 after removal from base
  2021-03-18 21:02 [PATCH] Fix build on FreeBSD 13 after removal from base Evilham
@ 2021-03-19 17:06 ` Jason A. Donenfeld
  0 siblings, 0 replies; 2+ messages in thread
From: Jason A. Donenfeld @ 2021-03-19 17:06 UTC (permalink / raw)
  To: Evilham; +Cc: WireGuard mailing list

Thanks for the patch. I addressed this slightly differently here:

https://git.zx2c4.com/wireguard-freebsd/commit/?id=519e70d5fe88f1ae3c6d2318b22ecf927953fd02

I also trimmed those structs down a bit, as the latter members differ
between 13 and 14.

^ permalink raw reply	[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

Development discussion of WireGuard

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ http://inbox.vuxu.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git