Skip to content

Instantly share code, notes, and snippets.

@cypres
Created June 25, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cypres/2f15599343ac12e27182 to your computer and use it in GitHub Desktop.
Save cypres/2f15599343ac12e27182 to your computer and use it in GitHub Desktop.
Patches for protolib
--- protolib/wscript.orig 2015-06-25 13:43:01 UTC
+++ protolib/wscript
@@ -85,6 +85,8 @@ def configure(ctx):
if system == 'freebsd':
ctx.env.DEFINES_BUILD_PROTOLIB += ['HAVE_FLOCK']
+ ctx.env.CFLAGS += ['-DRTF_WASCLONED=0x20000']
+ ctx.env.CXXFLAGS += ['-DRTF_WASCLONED=0x20000']
if system == 'windows':
ctx.env.DEFINES_BUILD_PROTOLIB += ['_CRT_SECURE_NO_WARNINGS',
@@ -194,7 +196,7 @@ def build(ctx):
protolib.source.append('src/linux/linuxDetour.cpp')
protolib.use.append('NETFILTER_QUEUE')
- if system in ('darwin', 'freebsd'):
+ if system == 'darwin':
protolib.source.extend(['src/bsd/{0}.cpp'.format(x) for x in [
'bsdDetour',
'bsdNet',
@@ -202,6 +204,11 @@ def build(ctx):
]])
protolib.source.append('src/unix/bpfCap.cpp')
+ if system == 'freebsd':
+ protolib.source.extend(['src/bsd/{0}.cpp'.format(x) for x in [
+ 'bsdRouteMgr',
+ ]])
+
if system == 'windows':
protolib.source.extend(['src/win32/{0}.cpp'.format(x) for x in [
'win32Net',
--- protolib/src/common/protoSocket.cpp.orig 2015-06-25 13:43:52 UTC
+++ protolib/src/common/protoSocket.cpp
@@ -6,6 +6,7 @@
#ifdef MACOSX
#include <arpa/nameser.h>
#endif // MACOSX
+#include <netinet/in.h>
#include <resolv.h>
#endif // HAVE_IPV6
#include <sys/ioctl.h>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment