From: Stephen Hemminger <stephen@networkplumber.org>
To: Baruch Siach <baruch@tkos.co.il>
Cc: netdev@vger.kernel.org,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Subject: Re: [PATCH 2/2] Add missing <sys/types.h> include
Date: Mon, 22 May 2017 10:24:42 -0700 [thread overview]
Message-ID: <20170522102442.51d36c39@xeon-e3> (raw)
In-Reply-To: <5cdba9c8dc972d25219517ade6129faf73f459b3.1495459674.git.baruch@tkos.co.il>
On Mon, 22 May 2017 16:27:54 +0300
Baruch Siach <baruch@tkos.co.il> wrote:
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>
> The u_intXX_t types are defined in <sys/types.h>, so it should be
> included before using those types. Otherwise, with certain C
> libraries, the build fails with:
>
> In file included from ../include/iptables.h:4:0,
> from m_ipt.c:18:
> ../include/iptables_common.h:47:16: error: unknown type name ‘u_int32_t’
> #define __le32 u_int32_t
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> include/iptables_common.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/iptables_common.h b/include/iptables_common.h
> index 9099667ffa6d..2c27a4b61fcd 100644
> --- a/include/iptables_common.h
> +++ b/include/iptables_common.h
> @@ -43,6 +43,8 @@ extern char *lib_dir;
> extern void init_extensions(void);
> #endif
>
> +#include <sys/types.h>
> +
> #define __be32 u_int32_t
> #define __le32 u_int32_t
> #define __be16 u_int16_t
This include file comes from netfilter, so not going to change it in iproute2 repo.
next prev parent reply other threads:[~2017-05-22 17:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 13:27 [PATCH 1/2] ip: include libc headers first Baruch Siach
2017-05-22 13:27 ` [PATCH 2/2] Add missing <sys/types.h> include Baruch Siach
2017-05-22 17:24 ` Stephen Hemminger [this message]
2017-05-22 20:09 ` Baruch Siach
2017-05-22 20:23 ` Stephen Hemminger
2017-05-31 0:31 ` [PATCH 1/2] ip: include libc headers first Stephen Hemminger
2017-05-31 20:59 ` Baruch Siach
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=20170522102442.51d36c39@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=baruch@tkos.co.il \
--cc=netdev@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.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).