From 09a7249cfcc9e0d29f9a210eb4be14f3f28002a7 Mon Sep 17 00:00:00 2001 From: Matyas Markovics Date: Fri, 5 Feb 2021 08:24:39 +0100 Subject: [PATCH 1/2] Fix order of linked libs, see https://stackoverflow.com/a/15327935 --- Dockerfile.full | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.full b/Dockerfile.full index e9f59a3..50b2dbb 100644 --- a/Dockerfile.full +++ b/Dockerfile.full @@ -26,7 +26,7 @@ COPY . 3proxy RUN cd 3proxy &&\ echo "">> Makefile.Linux &&\ echo PLUGINS = StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin SSLPlugin>>Makefile.Linux &&\ - echo LIBS = -l:libcrypto.a -l:libssl.a -ldl >>Makefile.Linux &&\ + echo LIBS = -l:libssl.a -l:libcrypto.a -ldl >>Makefile.Linux &&\ make -f Makefile.Linux &&\ strip bin/3proxy &&\ strip bin/StringsPlugin.ld.so &&\ From 870e34d77c3b435db8ac0c69298158f321849da0 Mon Sep 17 00:00:00 2001 From: Matyas Markovics Date: Fri, 5 Feb 2021 12:56:15 +0100 Subject: [PATCH 2/2] Define _set_errno if not present on the compile-platform (e.g. Linux) --- src/proxy.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/proxy.h b/src/proxy.h index 85beda4..aee4fc6 100644 --- a/src/proxy.h +++ b/src/proxy.h @@ -116,6 +116,10 @@ void daemonize(void); #ifdef _WIN32 #define strcasecmp stricmp #define strncasecmp strnicmp +#else +#ifndef _set_errno +#define _set_errno(x) (errno = x) +#endif #endif #ifndef SOCKET_ERROR