From: Mike Frysinger Date: Mon, 27 Feb 2012 06:12:53 +0000 (-0500) Subject: libext2fs: include sys/time.h for gettimeofday() X-Git-Tag: v1.42.2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b96365f8c2e48b714332d038c6360f9993ac17e0;p=thirdparty%2Fe2fsprogs.git libext2fs: include sys/time.h for gettimeofday() 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 Signed-off-by: Theodore Ts'o --- diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c index bf1a76b91..fa8d7b752 100644 --- a/lib/ext2fs/gen_bitmap64.c +++ b/lib/ext2fs/gen_bitmap64.c @@ -25,6 +25,9 @@ #if HAVE_SYS_TYPES_H #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif #include "ext2_fs.h" #include "ext2fsP.h"