* [ethtool][PATCH] Fix build with musl libc
@ 2014-10-26 11:44 Paul Barker
2014-10-26 11:44 ` [ethtool][PATCH] Fix build with musl by using more common typedefs Paul Barker
0 siblings, 1 reply; 4+ messages in thread
From: Paul Barker @ 2014-10-26 11:44 UTC (permalink / raw)
To: Ben Hutchings, netdev; +Cc: Paul Barker
This patch is taken from the Sabotage Linux distro which uses musl as the system
C library. It has also been successfully used within the OpenEmbedded build
system which supports glibc, uclibc and now musl. I'm submitting this on behalf
of the original patch author to save time.
It's a fairly simple change so it shouldn't cause any problems. However, I've
not submitted anything to ethtool or the kernel before so just let me know if
I've done something wrong and I'll try to fix it.
I'm not subscribed to netdev@ so please Cc me in any replies.
Paul Barker (1):
Fix build with musl by using more common typedefs
internal.h | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
--
2.1.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ethtool][PATCH] Fix build with musl by using more common typedefs
2014-10-26 11:44 [ethtool][PATCH] Fix build with musl libc Paul Barker
@ 2014-10-26 11:44 ` Paul Barker
2014-11-13 11:22 ` Paul Barker
2014-12-14 18:37 ` Ben Hutchings
0 siblings, 2 replies; 4+ messages in thread
From: Paul Barker @ 2014-10-26 11:44 UTC (permalink / raw)
To: Ben Hutchings, netdev; +Cc: Paul Barker, John Spencer
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>
---
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"
--
2.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [ethtool][PATCH] Fix build with musl by using more common typedefs
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
1 sibling, 0 replies; 4+ messages in thread
From: Paul Barker @ 2014-11-13 11:22 UTC (permalink / raw)
To: Ben Hutchings, netdev; +Cc: Paul Barker, John Spencer
On 26 October 2014 11:44, Paul Barker <paul@paulbarker.me.uk> 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>
> ---
> 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"
> --
> 2.1.2
>
Ping. Could you let me know if this patch is acceptable or not?
Cheers,
--
Paul Barker
Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ethtool][PATCH] Fix build with musl by using more common typedefs
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
1 sibling, 0 replies; 4+ messages in thread
From: Ben Hutchings @ 2014-12-14 18:37 UTC (permalink / raw)
To: Paul Barker; +Cc: Ben Hutchings, netdev, John Spencer
[-- 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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-12-14 18:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox