summaryrefslogtreecommitdiff
path: root/net/https-dns-proxy/patches
diff options
context:
space:
mode:
authorStan Grishin <stangri@melmac.net>2021-03-25 22:55:33 +0000
committerRosen Penev <rosenp@gmail.com>2021-03-25 16:46:01 -0700
commit84fc5dfad456bca239beb7367fb5ebb66741b964 (patch)
treec1e5bdd204563aad5d10877a856cc048e7b8a4ca /net/https-dns-proxy/patches
parente7caf1f2ba9a99a0d6f6f0e82987a3836c9864ae (diff)
https-dns-proxy: bugfix: correct PROCD firewall object
Signed-off-by: Stan Grishin <stangri@melmac.net>
Diffstat (limited to 'net/https-dns-proxy/patches')
-rw-r--r--net/https-dns-proxy/patches/010-ninja.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/net/https-dns-proxy/patches/010-ninja.patch b/net/https-dns-proxy/patches/010-ninja.patch
new file mode 100644
index 000000000..2f29bdbd6
--- /dev/null
+++ b/net/https-dns-proxy/patches/010-ninja.patch
@@ -0,0 +1,33 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -5,7 +5,6 @@ set(CMAKE_BUILD_TYPE "Debug")
+ #set(CMAKE_BUILD_TYPE "Release")
+
+ #set(CMAKE_C_FLAGS "-Wall -Wextra --pedantic -Wno-strict-aliasing")
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$(notdir $<)\"'")
+ set(CMAKE_C_FLAGS_DEBUG "-g")
+ set(CMAKE_C_FLAGS_RELEASE "-O2")
+
+--- a/src/logging.h
++++ b/src/logging.h
+@@ -34,6 +34,20 @@ enum _LogSeverity {
+ LOG_FATAL = 4,
+ };
+
++#define STRIPPATH(s)\
++ (sizeof(s) > 2 && (s)[sizeof(s)-2] == '/' ? (s) + sizeof(s) - 1 : \
++ sizeof(s) > 3 && (s)[sizeof(s)-3] == '/' ? (s) + sizeof(s) - 2 : \
++ sizeof(s) > 4 && (s)[sizeof(s)-4] == '/' ? (s) + sizeof(s) - 3 : \
++ sizeof(s) > 5 && (s)[sizeof(s)-5] == '/' ? (s) + sizeof(s) - 4 : \
++ sizeof(s) > 6 && (s)[sizeof(s)-6] == '/' ? (s) + sizeof(s) - 5 : \
++ sizeof(s) > 7 && (s)[sizeof(s)-7] == '/' ? (s) + sizeof(s) - 6 : \
++ sizeof(s) > 8 && (s)[sizeof(s)-8] == '/' ? (s) + sizeof(s) - 7 : \
++ sizeof(s) > 9 && (s)[sizeof(s)-9] == '/' ? (s) + sizeof(s) - 8 : \
++ sizeof(s) > 10 && (s)[sizeof(s)-10] == '/' ? (s) + sizeof(s) - 9 : \
++ sizeof(s) > 11 && (s)[sizeof(s)-11] == '/' ? (s) + sizeof(s) - 10 : (s))
++
++#define __FILENAME__ STRIPPATH(__FILE__)
++
+ // Debug, Info, Warning, Error logging.
+ #define DLOG(...) _log(__FILENAME__, __LINE__, LOG_DEBUG, __VA_ARGS__)
+ #define ILOG(...) _log(__FILENAME__, __LINE__, LOG_INFO, __VA_ARGS__)