DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, Kevin Traynor <ktraynor@redhat.com>,
	Tomasz Kantecki <tomasz.kantecki@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Subject: [PATCH] examples/l2fwd-cat: fix build
Date: Wed,  5 Oct 2022 16:23:47 +0100	[thread overview]
Message-ID: <20221005152347.330954-1-ktraynor@redhat.com> (raw)

<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


             reply	other threads:[~2022-10-05 15:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-05 15:23 Kevin Traynor [this message]
2022-10-05 15:28 ` David Marchand
2022-10-06 10:33   ` Thomas Monjalon
2022-10-05 16:57 ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221005152347.330954-1-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=tomasz.kantecki@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).