From: Andreas Henriksson <andreas@fatal.se>
To: util-linux@vger.kernel.org
Cc: Andreas Henriksson <andreas@fatal.se>
Subject: [PATCH 3/3] hwclock: fix iopl implicit declaration warning on alpha
Date: Fri, 21 Aug 2015 16:13:29 +0200 [thread overview]
Message-ID: <1440166409-32215-3-git-send-email-andreas@fatal.se> (raw)
In-Reply-To: <1440166409-32215-1-git-send-email-andreas@fatal.se>
Build warning:
sys-utils/hwclock-cmos.c: In function 'i386_iopl':
sys-utils/hwclock-cmos.c:611:9: warning: implicit declaration of function 'iopl' [-Wimplicit-function-declaration]
return iopl(level);
^
sys-utils/hwclock-cmos.c:611:2: warning: nested extern declaration of 'iopl' [-Wnested-externs]
return iopl(level);
^
Also:
checking sys/io.h usability... yes
checking sys/io.h presence... yes
checking for sys/io.h... yes
Full build log:
https://buildd.debian.org/status/fetch.php?pkg=util-linux&arch=alpha&ver=2.26.2-9&stamp=1440078034
Detected by/via:
https://qa.debian.org/bls/packages/u/util-linux.html
Please note that this has never been (build-)tested, but should hopefully
resolve the warning.
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
---
sys-utils/hwclock-cmos.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sys-utils/hwclock-cmos.c b/sys-utils/hwclock-cmos.c
index de678ab..7f564e7 100644
--- a/sys-utils/hwclock-cmos.c
+++ b/sys-utils/hwclock-cmos.c
@@ -79,9 +79,14 @@ int inb(int c __attribute__ ((__unused__)))
#endif /* __i386__ __x86_64__ */
#elif defined(__alpha__)
+# ifdef HAVE_SYS_IO_H
+# include <sys/io.h>
+# else
/* <asm/io.h> fails to compile, probably because of u8 etc */
extern unsigned int inb(unsigned long port);
extern void outb(unsigned char b, unsigned long port);
+extern int iopl(int level);
+# endif
#else
static void outb(int a __attribute__ ((__unused__)),
int b __attribute__ ((__unused__)))
--
2.1.4
next prev parent reply other threads:[~2015-08-21 14:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-21 14:13 [PATCH 1/3] hwclock: fix signed/unsigned comparison warning on alpha Andreas Henriksson
2015-08-21 14:13 ` [PATCH 2/3] hwclock: fix fgets unchecked return value " Andreas Henriksson
2015-08-21 14:13 ` Andreas Henriksson [this message]
2015-08-24 8:58 ` [PATCH 1/3] hwclock: fix signed/unsigned comparison " Karel Zak
2015-09-01 14:13 ` Andreas Henriksson
2015-09-07 6:52 ` Karel Zak
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=1440166409-32215-3-git-send-email-andreas@fatal.se \
--to=andreas@fatal.se \
--cc=util-linux@vger.kernel.org \
/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