Whamcloud - gitweb
libext2s: only define FS_IOC_FIEMAP on Linux systems
authorTheodore Ts'o <tytso@mit.edu>
Wed, 11 May 2016 03:44:21 +0000 (23:44 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 11 May 2016 03:44:21 +0000 (23:44 -0400)
Hurd and *BSD is not going to have FS_IOC_FIEMAP, at least not at
Linux's codepoint.

Addresses-Debian-Bug: #822576

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/fiemap.h

index 895cd0b..a331bc1 100644 (file)
@@ -34,7 +34,7 @@ struct fiemap {
        struct fiemap_extent fm_extents[0]; /* array of mapped extents (out) */
 };
 
-#ifndef FS_IOC_FIEMAP
+#if defined(__linux__) && !defined(FS_IOC_FIEMAP)
 #define FS_IOC_FIEMAP  _IOWR('f', 11, struct fiemap)
 #endif