lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 26 Oct 2014 11:44:09 +0000
From:	Paul Barker <paul@...lbarker.me.uk>
To:	Ben Hutchings <bwh@...nel.org>, netdev@...r.kernel.org
Cc:	Paul Barker <paul@...lbarker.me.uk>,
	John Spencer <maillist-linux@...fooze.de>
Subject: [ethtool][PATCH] Fix build with musl by using more common typedefs

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@...fooze.de>
Signed-off-by: Paul Barker <paul@...lbarker.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

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists