From 064d7b4ae2a45bc4d44fb0f7b583ee6568ac9925 Mon Sep 17 00:00:00 2001 From: zxl hhyccc <45259624+zxlhhyccc@users.noreply.github.com> Date: Wed, 25 Sep 2024 21:17:45 +0800 Subject: [PATCH] n2n: Add missing header files target-aarch64_cortex-a53_musl/n2n-3.0/src/edge_utils.c:1685:36: warning: nested extern declaration of 'ZSTD_getErrorName' [-Wnested-externs] /home/lin/ax6-6.x/build_dir/target-aarch64_cortex-a53_musl/n2n-3.0/src/edge_utils.c: In function 'edge_send_packet2net': /home/lin/ax6-6.x/build_dir/target-aarch64_cortex-a53_musl/n2n-3.0/src/edge_utils.c:2245:44: error: implicit declaration of function 'ZSTD_compress' [-Wimplicit-function-declaration] --- .../101-Add-missing-header-zstd-build.patch | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 net/n2n/patches/101-Add-missing-header-zstd-build.patch diff --git a/net/n2n/patches/101-Add-missing-header-zstd-build.patch b/net/n2n/patches/101-Add-missing-header-zstd-build.patch new file mode 100644 index 0000000000..5199e84966 --- /dev/null +++ b/net/n2n/patches/101-Add-missing-header-zstd-build.patch @@ -0,0 +1,30 @@ +--- a/src/edge_utils.c ++++ b/src/edge_utils.c +@@ -19,6 +19,7 @@ + #include "n2n.h" + #include "network_traffic_filter.h" + #include "edge_utils_win32.h" ++#include + + /* heap allocation for compression as per lzo example doc */ + #define HEAP_ALLOC(var,size) lzo_align_t __LZO_MMODEL var [ ((size) + (sizeof(lzo_align_t) - 1)) / sizeof(lzo_align_t) ] +--- a/tools/n2n-benchmark.c ++++ b/tools/n2n-benchmark.c +@@ -23,6 +23,7 @@ + #endif + + #include "n2n.h" ++#include + + #define DURATION 2.5 // test duration per algorithm + #define PACKETS_BEFORE_GETTIME 2047 // do not check time after every packet but after (2 ^ n - 1) +--- a/tools/tests-compress.c ++++ b/tools/tests-compress.c +@@ -22,6 +22,7 @@ + + #include "n2n.h" + #include "hexdump.h" ++#include + + /* heap allocation for compression as per lzo example doc */ + #define HEAP_ALLOC(var,size) lzo_align_t __LZO_MMODEL var [ ((size) + (sizeof(lzo_align_t) - 1)) / sizeof(lzo_align_t) ]