[PATCH] examples/l2fwd-cat: fix build
Thomas Monjalon
thomas at monjalon.net
Thu Oct 6 12:33:59 CEST 2022
05/10/2022 17:28, David Marchand:
> On Wed, Oct 5, 2022 at 5:24 PM Kevin Traynor <ktraynor at redhat.com> wrote:
> >
> > <ctype.h> and <errno.h> need to be included for the build
> > since they were removed from <rte_common.h>.
> >
> > ../examples/l2fwd-cat/cat.c: In function ‘parse_set’:
> > ../examples/l2fwd-cat/cat.c:66:16:
> > warning: implicit declaration of function ‘isblank’
> > [-Wimplicit-function-declaration]
> > 66 | while (isblank(*str))
> > | ^~~~~~~
> > ../examples/l2fwd-cat/cat.c:18:1:
> > note: include ‘<ctype.h>’ or provide a declaration of ‘isblank’
> > 17 | #include "cat.h"
> > +++ |+#include <ctype.h>
> > 18 |
> > ../examples/l2fwd-cat/cat.c:70:15:
> > warning: implicit declaration of function ‘isdigit’
> > [-Wimplicit-function-declaration]
> > 70 | if ((!isdigit(*str) && *str != '(') || *str == '\0')
> > | ^~~~~~~
> > ../examples/l2fwd-cat/cat.c:70:15:
> > note: include ‘<ctype.h>’ or provide a declaration of ‘isdigit’
> > ../examples/l2fwd-cat/cat.c:75:17:
> > error: ‘errno’ undeclared (first use in this function)
> > 75 | errno = 0;
> > | ^~~~~
> > ../examples/l2fwd-cat/cat.c:18:1:
> > note: ‘errno’ is defined in header ‘<errno.h>’;
> > did you forget to ‘#include <errno.h>’?
> > 17 | #include "cat.h"
> > +++ |+#include <errno.h>
> >
> > Fixes: 72b452c5f259 ("eal: remove unneeded includes from a public header")
> >
> > Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
> Reviewed-by: David Marchand <david.marchand at redhat.com>
Applied, thanks.
More information about the dev
mailing list