DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] examples/l2fwd-cat: fix build
@ 2022-10-05 15:23 Kevin Traynor
  2022-10-05 15:28 ` David Marchand
  2022-10-05 16:57 ` David Marchand
  0 siblings, 2 replies; 4+ messages in thread
From: Kevin Traynor @ 2022-10-05 15:23 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, Kevin Traynor, Tomasz Kantecki, Bruce Richardson,
	Dmitry Kozlyuk

<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@redhat.com>
---
 examples/l2fwd-cat/cat.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/l2fwd-cat/cat.c b/examples/l2fwd-cat/cat.c
index 77154c8b7e..00e4cde48b 100644
--- a/examples/l2fwd-cat/cat.c
+++ b/examples/l2fwd-cat/cat.c
@@ -3,4 +3,6 @@
  */
 
+#include <ctype.h>
+#include <errno.h>
 #include <getopt.h>
 #include <inttypes.h>
-- 
2.37.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-06 10:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05 15:23 [PATCH] examples/l2fwd-cat: fix build Kevin Traynor
2022-10-05 15:28 ` David Marchand
2022-10-06 10:33   ` Thomas Monjalon
2022-10-05 16:57 ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).