-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Can't build in FreeBSD 12.1. Here I attach the error output:
[netmap@netmap ~/netmap-fwd]$ make
cc -O2 -fPIC -g -Wall -Wshadow -Wcast-qual -Wwrite-strings -Wredundant-decls -Wnested-externs -Winline -I/usr/local/include -c arp.c
In file included from arp.c:51:
./util.h:33:5: error: conflicting types for 'dprintf'
int dprintf(const char *, ...);
^
/usr/include/stdio.h:376:6: note: previous declaration is here
int dprintf(int, const char * __restrict, ...) __printflike(2, 3);
^
arp.c:394:11: warning: incompatible pointer to integer conversion passing
'const char [44]' to parameter of type 'int' [-Wint-conversion]
DPRINTF("%s: discarding the packet, too short (%d).\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./util.h:29:54: note: expanded from macro 'DPRINTF'
#define DPRINTF(_fmt, args...) if (verbose) dprintf(_fmt, ## args)
^~~~
/usr/include/stdio.h:376:17: note: passing argument to parameter here
int dprintf(int, const char * __restrict, ...) __printflike(2, 3);
^
arp.c:401:11: warning: incompatible pointer to integer conversion passing
'const char [44]' to parameter of type 'int' [-Wint-conversion]
DPRINTF("%s: discarding the packet, too short (%d).\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./util.h:29:54: note: expanded from macro 'DPRINTF'
#define DPRINTF(_fmt, args...) if (verbose) dprintf(_fmt, ## args)
^~~~
/usr/include/stdio.h:376:17: note: passing argument to parameter here
int dprintf(int, const char * __restrict, ...) __printflike(2, 3);
^
arp.c:407:11: warning: incompatible pointer to integer conversion passing
'const char [37]' to parameter of type 'int' [-Wint-conversion]
DPRINTF("%s: discarding non-ethernet packet.\n", __func__);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./util.h:29:54: note: expanded from macro 'DPRINTF'
#define DPRINTF(_fmt, args...) if (verbose) dprintf(_fmt, ## args)
^~~~
/usr/include/stdio.h:376:17: note: passing argument to parameter here
int dprintf(int, const char * __restrict, ...) __printflike(2, 3);
^
arp.c:412:11: warning: incompatible pointer to integer conversion passing
'const char [52]' to parameter of type 'int' [-Wint-conversion]
DPRINTF("%s: unsupported protocol %#04x, discarding packet.\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./util.h:29:54: note: expanded from macro 'DPRINTF'
#define DPRINTF(_fmt, args...) if (verbose) dprintf(_fmt, ## args)
^~~~
/usr/include/stdio.h:376:17: note: passing argument to parameter here
int dprintf(int, const char * __restrict, ...) __printflike(2, 3);
^
arp.c:418:11: warning: incompatible pointer to integer conversion passing
'const char [58]' to parameter of type 'int' [-Wint-conversion]
DPRINTF("%s: unsupported hardware length (%d), discarding packet.\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./util.h:29:54: note: expanded from macro 'DPRINTF'
#define DPRINTF(_fmt, args...) if (verbose) dprintf(_fmt, ## args)
^~~~
/usr/include/stdio.h:376:17: note: passing argument to parameter here
int dprintf(int, const char * __restrict, ...) __printflike(2, 3);
^
arp.c:424:11: warning: incompatible pointer to integer conversion passing
'const char [58]' to parameter of type 'int' [-Wint-conversion]
DPRINTF("%s: unsupported protocol length (%d), discarding packet.\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./util.h:29:54: note: expanded from macro 'DPRINTF'
#define DPRINTF(_fmt, args...) if (verbose) dprintf(_fmt, ## args)
^~~~
/usr/include/stdio.h:376:17: note: passing argument to parameter here
int dprintf(int, const char * __restrict, ...) __printflike(2, 3);
^
arp.c:448:11: warning: incompatible pointer to integer conversion passing
'const char [53]' to parameter of type 'int' [-Wint-conversion]
DPRINTF("%s: ARP operation not supported, discarding packet.\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./util.h:29:54: note: expanded from macro 'DPRINTF'
#define DPRINTF(_fmt, args...) if (verbose) dprintf(_fmt, ## args)
^~~~
/usr/include/stdio.h:376:17: note: passing argument to parameter here
int dprintf(int, const char * __restrict, ...) __printflike(2, 3);
^
arp.c:466:11: warning: incompatible pointer to integer conversion passing
'const char [18]' to parameter of type 'int' [-Wint-conversion]
DPRINTF("%s: no IP for %s\n", __func__, nmif->nm_if_name);
^~~~~~~~~~~~~~~~~~~~
./util.h:29:54: note: expanded from macro 'DPRINTF'
#define DPRINTF(_fmt, args...) if (verbose) dprintf(_fmt, ## args)
^~~~
/usr/include/stdio.h:376:17: note: passing argument to parameter here
int dprintf(int, const char * __restrict, ...) __printflike(2, 3);
^
8 warnings and 1 error generated.
*** Error code 1
Stop.
make: stopped in /usr/home/netmap/netmap-fwd
Any clues about how to build it without errors? Maybe an older version of FreeBSD could work?
Metadata
Metadata
Assignees
Labels
No labels