]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
libcephfs: only check file offset on glibc platforms 6288/head
authorJohn Coyle <dx9err@gmail.com>
Thu, 15 Oct 2015 20:10:30 +0000 (16:10 -0400)
committerJohn Coyle <dx9err@gmail.com>
Thu, 15 Oct 2015 20:10:30 +0000 (16:10 -0400)
Signed-off-by: John Coyle dx9err@gmail.com
src/include/cephfs/libcephfs.h

index 20830933ada5f89addb66426b87685bdfd894662..fc1e2a725a8a27106ce2120e5d57676f983748c9 100644 (file)
@@ -15,6 +15,7 @@
 #ifndef CEPH_LIB_H
 #define CEPH_LIB_H
 
+#include <features.h>
 #include <utime.h>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -41,11 +42,10 @@ extern "C" {
 #define LIBCEPHFS_VERSION_CODE LIBCEPHFS_VERSION(LIBCEPHFS_VER_MAJOR, LIBCEPHFS_VER_MINOR, LIBCEPHFS_VER_EXTRA)
 
 /*
- * On FreeBSD and Apple the offset is 64 bit, but libc doesn't announce it in
- * the way glibc does.
+ * If using glibc check that file offset is 64-bit.
  */
-#if !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(__USE_FILE_OFFSET64)
-# error libceph: must define __USE_FILE_OFFSET64 or readdir results will be corrupted
+#if defined(__GLIBC__) && !defined(__USE_FILE_OFFSET64)
+# error libceph: glibc must define __USE_FILE_OFFSET64 or readdir results will be corrupted
 #endif
 
 /*