F-Stack / f-stack

F-Stack is an user space network development kit with high performance based on DPDK, FreeBSD TCP/IP stack and coroutine API.
http://www.f-stack.org
Other
3.82k stars 895 forks source link

compile netstat in tools error. #376

Open liningjie418 opened 5 years ago

liningjie418 commented 5 years ago

I compiled the tools follow the quick start and found the binary netstat failed :

Ubuntu 16.04.11 x86_64 gcc 5.4

In file included from inet.c:85:0: nl_defs.h:3:1: error: stray ‘\’ in program #define N_AHSTAT 0 ^ nl_defs.h:3:2: error: stray ‘#’ in program #define N_AHSTAT 0 ^ nl_defs.h:3:3: error: unknown type name ‘define’ #define N_AHSTAT 0 ^ nl_defs.h:3:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before numeric constant #define N_AHSTAT 0

tb-bingel commented 5 years ago
--- a/FStackV1.12/tools/netstat/Makefile
+++ b/FStackV1.12/tools/netstat/Makefile
@@ -67,6 +67,6 @@ nl_defs.h: nlist_symbols
                 print "extern struct nlist nl[];"; \
                 i = 0; \
             } \
-            !/^\#/ { printf("\#define\tN%s\t%s\n", toupper($$2), i++); }' \
+            !/^\#/ { printf("#define\tN%s\t%s\n", toupper($$2), i++); }' \
             < $^ > $@ 
tb-bingel commented 5 years ago

patch , make clean , make