Error at the time of compiling netmap-fwd on -CURRENT

Kevin Bowling kevin.bowling at kev009.com
Mon Mar 27 07:48:20 UTC 2017


Hi,

The DPRINTF macro in netmap-fwd is defined as #define *DPRINTF*(_fmt,
args...) if (verbose) dprintf(_fmt, ## args)

while  dprintf is defined as dprintf(int fd, const char * restrict format,
...); in stdio.h

You could try, simplistically, to change DPRINTF macro to #define
*DPRINTF*(_fmt,
args...) if (verbose) printf(_fmt, ## args)

to get going but there is likely more to the story.


Regards,


On Fri, Mar 24, 2017 at 4:19 PM, Caraballo-vega, Jordan A.
(GSFC-6062)[COMPUTER SCIENCE CORP] <jordancaraballo87 at gmail.com> wrote:

> Hello,
>
> I am trying to compile netmap-fwd from git
> (https://github.com/Netgate/netmap-fwd) on a Dell PE 530 with -CURRENT
> updated from today (03/24/17). With the dependencies installed ( # pkg
> install libucl libevent2 ) I run make and get the following error
> followed by 8 warnings:
>
> 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:364: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'
>
>
> Any idea or feedback would be greatly appreciated.
>
> Cheers,
>
> Jordan
>
>
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
>


More information about the freebsd-net mailing list