linux-ext4.vger.kernel.org archive mirror
 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

* [PATCH] libext2fs: include config.h for HAVE_xxx defines
  2012-02-24 17:18 [PATCH] libext2fs: include sys/time.h for gettimeofday() Mike Frysinger
@ 2012-02-24 17:18 ` 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
  1 sibling, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2012-02-24 17:18 UTC (permalink / raw)
  To: linux-ext4

We check HAVE_UNISTD_H but haven't included config.h yet, so we end up
hitting warnings about missing prototypes for close/read/etc... funcs.

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

diff --git a/lib/ext2fs/mmp.c b/lib/ext2fs/mmp.c
index b27d9a4..49a11da 100644
--- a/lib/ext2fs/mmp.c
+++ b/lib/ext2fs/mmp.c
@@ -13,6 +13,8 @@
 #define _GNU_SOURCE
 #endif
 
+#include "config.h"
+
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-- 
1.7.8.4


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

* Re: [PATCH] libext2fs: include sys/time.h for gettimeofday()
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Ted Ts'o @ 2012-02-27  6:13 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-ext4

On Fri, Feb 24, 2012 at 12:18:07PM -0500, Mike Frysinger wrote:
> 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>

Thanks, applied.

						- Ted

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

* Re: [PATCH] libext2fs: include config.h for HAVE_xxx defines
  2012-02-24 17:18 ` [PATCH] libext2fs: include config.h for HAVE_xxx defines Mike Frysinger
@ 2012-02-27  6:13   ` Ted Ts'o
  0 siblings, 0 replies; 4+ messages in thread
From: Ted Ts'o @ 2012-02-27  6:13 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-ext4

On Fri, Feb 24, 2012 at 12:18:08PM -0500, Mike Frysinger wrote:
> We check HAVE_UNISTD_H but haven't included config.h yet, so we end up
> hitting warnings about missing prototypes for close/read/etc... funcs.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Thanks, applied.

						- Ted

^ permalink raw reply	[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 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).