diff options
author | Andreas Dilger <adilger@whamcloud.com> | 2011-06-11 11:50:01 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-06-11 11:50:01 -0400 |
commit | a1a769987b0604d8836541cefe89661ec8db02c7 (patch) | |
tree | bf73eadee99a000c1a043e9fa411e88aa7300f6d /lib/ext2fs/flushb.c | |
parent | 65d05cec3d4ae02dec1b15dfec21e571cb83c9cf (diff) | |
download | android_external_e2fsprogs-a1a769987b0604d8836541cefe89661ec8db02c7.tar.gz android_external_e2fsprogs-a1a769987b0604d8836541cefe89661ec8db02c7.tar.bz2 android_external_e2fsprogs-a1a769987b0604d8836541cefe89661ec8db02c7.zip |
misc: fix compile warnings on OSX
The BLKFLSBUF and FDFLUSH ioctls are Linux specific, and do not
really have anything to do with __GNUC__ (which is also used on
OS/X and Solaris). Only print these warnings on Linux systems.
statfs64() is deprecated on OSX and generates a deliberate warning.
Fix some other warnings that show up on OSX builds.
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'lib/ext2fs/flushb.c')
-rw-r--r-- | lib/ext2fs/flushb.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/ext2fs/flushb.c b/lib/ext2fs/flushb.c index 394bb074..ee0093ad 100644 --- a/lib/ext2fs/flushb.c +++ b/lib/ext2fs/flushb.c @@ -65,17 +65,13 @@ errcode_t ext2fs_sync_device(int fd, int flushb) #ifdef BLKFLSBUF if (ioctl (fd, BLKFLSBUF, 0) == 0) return 0; -#else -#ifdef __GNUC__ - #warning BLKFLSBUF not defined -#endif /* __GNUC__ */ +#elif defined(__linux__) +#warning BLKFLSBUF not defined #endif #ifdef FDFLUSH ioctl (fd, FDFLUSH, 0); /* In case this is a floppy */ -#else -#ifdef __GNUC__ - #warning FDFLUSH not defined -#endif /* __GNUC__ */ +#elif defined(__linux__) +#warning FDFLUSH not defined #endif } return 0; |