linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: linux-ext4@vger.kernel.org
Subject: [PATCH] libext2fs: include sys/time.h for gettimeofday()
Date: Fri, 24 Feb 2012 12:18:07 -0500	[thread overview]
Message-ID: <1330103888-7005-1-git-send-email-vapier@gentoo.org> (raw)

Building on my glibc-2.15 system hits a warning:
	gen_bitmap64.c: In function 'ext2fs_alloc_generic_bmap':
	gen_bitmap64.c:127:2: warning: implicit declaration of function
		'gettimeofday' [-Wimplicit-function-declaration]

Include sys/time.h if it's available for the prototype.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 lib/ext2fs/gen_bitmap64.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c
index bf1a76b..fa8d7b7 100644
--- a/lib/ext2fs/gen_bitmap64.c
+++ b/lib/ext2fs/gen_bitmap64.c
@@ -25,6 +25,9 @@
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
 
 #include "ext2_fs.h"
 #include "ext2fsP.h"
-- 
1.7.8.4


             reply	other threads:[~2012-02-24 17:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-24 17:18 Mike Frysinger [this message]
2012-02-24 17:18 ` [PATCH] libext2fs: include config.h for HAVE_xxx defines Mike Frysinger
2012-02-27  6:13   ` Ted Ts'o
2012-02-27  6:13 ` [PATCH] libext2fs: include sys/time.h for gettimeofday() Ted Ts'o

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=1330103888-7005-1-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=linux-ext4@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;
as well as URLs for NNTP newsgroup(s).