Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Mar 2017 00:48:19 -0700
From:      Kevin Bowling <kevin.bowling@kev009.com>
To:        "Caraballo-vega, Jordan A. (GSFC-6062)[COMPUTER SCIENCE CORP]" <jordancaraballo87@gmail.com>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: Error at the time of compiling netmap-fwd on -CURRENT
Message-ID:  <CAK7dMtCnwP%2BFQmQ-LD3Z155dPmFYS3h-=1r6pqbP9UDkWo5C6w@mail.gmail.com>
In-Reply-To: <ec32c207-3959-73b6-2eed-e3ff31259e57@gmail.com>
References:  <ec32c207-3959-73b6-2eed-e3ff31259e57@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAK7dMtCnwP%2BFQmQ-LD3Z155dPmFYS3h-=1r6pqbP9UDkWo5C6w>