From: David Decotigny <ddecotig@gmail.com>
To: netdev@vger.kernel.org
Cc: "Jeff Garzik" <jgarzik@pobox.com>,
"Ben Hutchings" <ben@decadent.org.uk>,
"David Miller" <davem@redhat.com>,
"Vidya Sagar Ravipati" <vidya@cumulusnetworks.com>,
"Maciej Żenczykowski" <maze@google.com>,
"David Decotigny" <decot@googlers.com>
Subject: [ethtool PATCH v2 01/12] internal.h: change to new sane powerpc64 kernel headers
Date: Thu, 3 Mar 2016 20:23:14 -0800 [thread overview]
Message-ID: <1457065405-19049-2-git-send-email-ddecotig@gmail.com> (raw)
In-Reply-To: <1457065405-19049-1-git-send-email-ddecotig@gmail.com>
From: Maciej Żenczykowski <maze@google.com>
This fixes:
In file included from ethtool-copy.h:22:0,
from internal.h:32,
from ethtool.c:29:
.../include/linux/types.h:32:25: error: conflicting types for '__be64'
typedef __u64 __bitwise __be64;
^
In file included from ethtool.c:29:0:
internal.h:23:28: note: previous declaration of '__be64' was here
typedef unsigned long long __be64;
^
ethtool.c: In function 'do_gstats':
ethtool.c:3166:4: error: format '%llu' expects argument of type 'long long unsigned int', but argument 5 has type '__u64' [-Werror=format=]
stats->data[i]);
^
ethtool.c: In function 'print_indir_table':
ethtool.c:3293:9: error: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type '__u64' [-Werror=format=]
ctx->devname, ring_count->data);
^
Signed-off-by: David Decotigny <decot@googlers.com>
---
internal.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/internal.h b/internal.h
index b5ef646..5f8504d 100644
--- a/internal.h
+++ b/internal.h
@@ -3,6 +3,13 @@
#ifndef ETHTOOL_INTERNAL_H__
#define ETHTOOL_INTERNAL_H__
+#ifdef __powerpc64__
+/* Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select
+ * 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu.
+ */
+#define __SANE_USERSPACE_TYPES__
+#endif
+
#ifdef HAVE_CONFIG_H
#include "ethtool-config.h"
#endif
--
2.7.0.rc3.207.g0ac5344
next prev parent reply other threads:[~2016-03-04 4:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 4:23 [ethtool PATCH v2 00/12] add support for new ETHTOOL_xLINKSETTINGS ioctls David Decotigny
2016-03-04 4:23 ` David Decotigny [this message]
2016-03-04 13:31 ` [ethtool PATCH v2 01/12] internal.h: change to new sane powerpc64 kernel headers Maciej Żenczykowski
2016-03-04 4:23 ` [ethtool PATCH v2 02/12] ethtool.c: don't ignore fread() return value David Decotigny
2016-03-04 4:23 ` [ethtool PATCH v2 03/12] ethtool.c: fix dump_regs heap corruption David Decotigny
2016-03-04 4:23 ` [ethtool PATCH v2 04/12] ethtool.c: do_seeprom checks for params & stdin sanity David Decotigny
2016-03-04 4:23 ` [ethtool PATCH v2 05/12] marvell.c: fix strict alias warnings David Decotigny
2016-03-04 13:31 ` Maciej Żenczykowski
2016-03-04 4:23 ` [ethtool PATCH v2 06/12] test-common.c: fix test_realloc(NULL, ...) David Decotigny
2016-03-04 13:32 ` Maciej Żenczykowski
2016-03-04 4:23 ` [ethtool PATCH v2 07/12] test-features.c: add braces around array initialization David Decotigny
2016-03-04 13:31 ` Maciej Żenczykowski
2016-03-04 4:23 ` [ethtool PATCH v2 08/12] ethtool-copy.h: sync with net-next David Decotigny
2016-03-04 4:23 ` [ethtool PATCH v2 09/12] internal.h: fix build for latest ethtool-copy.h David Decotigny
2016-03-04 4:23 ` [ethtool PATCH v2 10/12] internal.h: TRUE/FALSE macros David Decotigny
2016-03-04 4:35 ` Joe Perches
2016-03-04 4:23 ` [ethtool PATCH v2 11/12] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls David Decotigny
2016-03-04 4:23 ` [ethtool PATCH v2 12/12] ethtool.c: use v6 socket when v4 is not available David Decotigny
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=1457065405-19049-2-git-send-email-ddecotig@gmail.com \
--to=ddecotig@gmail.com \
--cc=ben@decadent.org.uk \
--cc=davem@redhat.com \
--cc=decot@googlers.com \
--cc=jgarzik@pobox.com \
--cc=maze@google.com \
--cc=netdev@vger.kernel.org \
--cc=vidya@cumulusnetworks.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).