From 630c7131e88cedec8345f3f9c06c73aac2bbab2a Mon Sep 17 00:00:00 2001 From: 5u623l20 <5u623l20@users.noreply.github.com> Date: Thu, 21 Feb 2019 02:13:24 +0600 Subject: [PATCH 1/2] FreeBSD Compatibility For sockaddr_in FreeBSD needs netinet/in.h --- pxyconn.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pxyconn.h b/pxyconn.h index ebdc3c1..662a306 100644 --- a/pxyconn.h +++ b/pxyconn.h @@ -30,6 +30,10 @@ #ifndef PXYCONN_H #define PXYCONN_H +#if defined(__FreeBSD__) || defined(__DragonFly__) +#include +#endif + #include "proxy.h" #include "opts.h" #include "attrib.h" From a0a06ab45095efc74bbe4cc8bcae262b134791c6 Mon Sep 17 00:00:00 2001 From: Bastard Operator from Hell <5u623l20@protonmail.com> Date: Wed, 8 May 2019 12:21:37 +0000 Subject: [PATCH 2/2] FreeBSD do not have getdtablecount. --- pxyconn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pxyconn.c b/pxyconn.c index f4b08df..ef38c5e 100644 --- a/pxyconn.c +++ b/pxyconn.c @@ -938,7 +938,7 @@ pxy_try_remove_sslproxy_header(pxy_conn_child_ctx_t *ctx, unsigned char *packet, } } -#ifdef __APPLE__ +#if defined(__FreeBSD__) || defined(__APPLE__) #define getdtablecount() 0 /*