From: Ben Hutchings <ben@decadent.org.uk>
To: Paul Barker <paul@paulbarker.me.uk>
Cc: Ben Hutchings <bwh@kernel.org>,
netdev@vger.kernel.org, John Spencer <maillist-linux@barfooze.de>
Subject: Re: [ethtool][PATCH] Fix build with musl by using more common typedefs
Date: Sun, 14 Dec 2014 18:37:24 +0000 [thread overview]
Message-ID: <1418582244.30883.0.camel@decadent.org.uk> (raw)
In-Reply-To: <1414323849-5739-2-git-send-email-paul@paulbarker.me.uk>
[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]
On Sun, 2014-10-26 at 11:44 +0000, Paul Barker wrote:
> When using musl as the standard C library, type names such as '__int32_t' are
> not defined. Instead we must use the more commonly defined type names such as
> 'int32_t', which are defined in <stdint.h>.
>
> Signed-off-by: John Spencer <maillist-linux@barfooze.de>
> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Applied, thanks.
Ben.
> ---
> internal.h | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/internal.h b/internal.h
> index a9dfae0..262a39f 100644
> --- a/internal.h
> +++ b/internal.h
> @@ -7,6 +7,7 @@
> #include "ethtool-config.h"
> #endif
> #include <stdio.h>
> +#include <stdint.h>
> #include <stdlib.h>
> #include <string.h>
> #include <sys/types.h>
> @@ -17,16 +18,16 @@
>
> /* ethtool.h expects these to be defined by <linux/types.h> */
> #ifndef HAVE_BE_TYPES
> -typedef __uint16_t __be16;
> -typedef __uint32_t __be32;
> +typedef uint16_t __be16;
> +typedef uint32_t __be32;
> typedef unsigned long long __be64;
> #endif
>
> typedef unsigned long long u64;
> -typedef __uint32_t u32;
> -typedef __uint16_t u16;
> -typedef __uint8_t u8;
> -typedef __int32_t s32;
> +typedef uint32_t u32;
> +typedef uint16_t u16;
> +typedef uint8_t u8;
> +typedef int32_t s32;
>
> #include "ethtool-copy.h"
> #include "net_tstamp-copy.h"
--
Ben Hutchings
The two most common things in the universe are hydrogen and stupidity.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
prev parent reply other threads:[~2014-12-14 18:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-26 11:44 [ethtool][PATCH] Fix build with musl libc Paul Barker
2014-10-26 11:44 ` [ethtool][PATCH] Fix build with musl by using more common typedefs Paul Barker
2014-11-13 11:22 ` Paul Barker
2014-12-14 18:37 ` Ben Hutchings [this message]
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=1418582244.30883.0.camel@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=bwh@kernel.org \
--cc=maillist-linux@barfooze.de \
--cc=netdev@vger.kernel.org \
--cc=paul@paulbarker.me.uk \
/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