mirror of https://github.com/F-Stack/f-stack.git
Fix netstat tool compilation on linux
This commit is contained in:
parent
5b97230c85
commit
234ea262a5
|
@ -58,15 +58,6 @@ $ cd ../examples
|
||||||
$ make
|
$ make
|
||||||
```
|
```
|
||||||
|
|
||||||
## Compile tools in Ubuntu
|
|
||||||
|
|
||||||
- remove '\\' in statement printf at f-stack/tools/netstat/Makefile line 70, now it should be:
|
|
||||||
|
|
||||||
```
|
|
||||||
- printf("\#define\tN%s\t%s\n", toupper($$2), i++);
|
|
||||||
+ printf("#define\tN%s\t%s\n", toupper($$2), i++);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Compile dpdk in virtual machine
|
## Compile dpdk in virtual machine
|
||||||
|
|
||||||
- f-stack/dpdk/kernel/linux/igb_uio/igb_uio.c line 274:
|
- f-stack/dpdk/kernel/linux/igb_uio/igb_uio.c line 274:
|
||||||
|
|
|
@ -49,6 +49,8 @@ endif
|
||||||
|
|
||||||
include ${TOPDIR}/tools/prog.mk
|
include ${TOPDIR}/tools/prog.mk
|
||||||
|
|
||||||
|
UNAME := $(shell uname)
|
||||||
|
|
||||||
nl_symbols.c: nlist_symbols
|
nl_symbols.c: nlist_symbols
|
||||||
awk '\
|
awk '\
|
||||||
BEGIN { \
|
BEGIN { \
|
||||||
|
@ -60,6 +62,7 @@ nl_symbols.c: nlist_symbols
|
||||||
END { print "\t{ .n_name = NULL },\n};" } \
|
END { print "\t{ .n_name = NULL },\n};" } \
|
||||||
' < $^ > $@
|
' < $^ > $@
|
||||||
|
|
||||||
|
ifeq ($(UNAME), Linux)
|
||||||
nl_defs.h: nlist_symbols
|
nl_defs.h: nlist_symbols
|
||||||
awk '\
|
awk '\
|
||||||
BEGIN { \
|
BEGIN { \
|
||||||
|
@ -67,6 +70,16 @@ nl_defs.h: nlist_symbols
|
||||||
print "extern struct nlist nl[];"; \
|
print "extern struct nlist nl[];"; \
|
||||||
i = 0; \
|
i = 0; \
|
||||||
} \
|
} \
|
||||||
!/^\#/ { printf("\#define\tN%s\t%s\n", toupper($$2), i++); }' \
|
!/^\#/ { printf("#define\tN%s\t%s\n", toupper($$2), i++); }' \
|
||||||
< $^ > $@
|
< $^ > $@
|
||||||
|
else
|
||||||
|
nl_defs.h: nlist_symbols
|
||||||
|
awk '\
|
||||||
|
BEGIN { \
|
||||||
|
print "#include <nlist.h>"; \
|
||||||
|
print "extern struct nlist nl[];"; \
|
||||||
|
i = 0; \
|
||||||
|
} \
|
||||||
|
!/^\#/ { printf("\#define\tN%s\t%s\n", toupper($$2), i++); }' \
|
||||||
|
< $^ > $@
|
||||||
|
endif
|
||||||
|
|
Loading…
Reference in New Issue