All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libext2fs: include sys/time.h for gettimeofday()
@ 2012-02-24 17:18 Mike Frysinger
  2012-02-24 17:18 ` [PATCH] libext2fs: include config.h for HAVE_xxx defines Mike Frysinger
  2012-02-27  6:13 ` [PATCH] libext2fs: include sys/time.h for gettimeofday() Ted Ts'o
  0 siblings, 2 replies; 4+ messages in thread
From: Mike Frysinger @ 2012-02-24 17:18 UTC (permalink / raw)
  To: linux-ext4

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-27  6:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-24 17:18 [PATCH] libext2fs: include sys/time.h for gettimeofday() Mike Frysinger
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.