virtualsquare / virtualsquare/vde-2
Patches for support FreeBSD
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 255
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
- Fix search
if_tun.h:
--- CMakeLists.txt.orig 2026-03-23 08:45:44 UTC
+++ CMakeLists.txt
@@ -252,7 +252,7 @@ if(ENABLE_TUNTAP)
elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
include(CheckIncludeFile)
- cm_check_include("net/if_tun.h" HAVE_NET_IF_TUN_H)
+ cm_check_include("net/if.h;net/if_tun.h" HAVE_NET_IF_TUN_H)
if(HAVE_NET_IF_TUN_H)
add_definitions(-DHAVE_TUNTAP=1)
else()
--- Macros.cmake.orig 2026-03-23 08:45:44 UTC
+++ Macros.cmake
@@ -1,4 +1,4 @@
-include(CheckIncludeFile)
+include(CheckIncludeFiles)
include(CheckFunctionExists)
include(CheckLibraryExists)
include(CheckTypeSize)
@@ -30,7 +30,7 @@ macro(cm_check_include include var)
endmacro()
macro(cm_check_include include var)
- check_include_file(${include} ${var})
+ check_include_files("${include}" ${var})
if(${var})
set(defines ${defines} "#cmakedefine ${var}\n\n")
else()
- Fix build error:
--- src/dpipe.c.orig 2026-03-23 08:45:44 UTC
+++ src/dpipe.c
@@ -201,7 +201,11 @@ int main(int argc, char *argv[])
if (daemonize != 0)
daemon(0,0);
+#ifdef VDE_FREEBSD
+ else if (setpgrp(0,getpid()) == -1) {
+#else
else if (setpgrp() == -1) {
+#endif
fprintf(stderr,"Err: cannot create pgrp\n");
perror("setpgrp");
exit(1);
- Fix build if libpcap installed from ports:
--- src/vde_pcapplug.c.orig 2026-03-23 08:45:44 UTC
+++ src/vde_pcapplug.c
@@ -32,7 +32,6 @@
#include <libgen.h>
#define _GNU_SOURCE
#include <getopt.h>
-#include <pcap.h>
#include <limits.h>
#include <config.h>
@@ -41,8 +40,11 @@
#include <libvdeplug.h>
#ifdef VDE_FREEBSD
+#include <net/bpf.h>
#include <sys/socket.h>
#endif
+
+#include <pcap.h>
#if defined(VDE_DARWIN) || defined(VDE_FREEBSD)
# if defined HAVE_SYSLIMITS_H
- Fix build error:
--- src/vde_vxlan/vxlan.c.orig 2026-03-23 08:45:44 UTC
+++ src/vde_vxlan/vxlan.c
@@ -24,6 +24,7 @@
#include <netinet/in.h>
#include <sys/un.h>
+#include <sys/socket.h>
#include "vxlan_hash.h"
#include "log.h"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the FreeBSD-specific sections in CMakeLists.txt, Macros.cmake, src/dpipe.c, src/vde_pcapplug.c, and src/vde_vxlan/vxlan.c. Review the proposed changes and build the project with ENABLE_TUNTAP and libpcap on FreeBSD, then verify that the build completes and the affected tools can be configured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake
- Domain
- build-system, networking, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100