From b15c541d8b91c32099b72e9209e7af63298f1019 Mon Sep 17 00:00:00 2001 From: John Coyle Date: Thu, 15 Oct 2015 16:10:30 -0400 Subject: [PATCH] libcephfs: only check file offset on glibc platforms Signed-off-by: John Coyle dx9err@gmail.com --- src/include/cephfs/libcephfs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/cephfs/libcephfs.h b/src/include/cephfs/libcephfs.h index 20830933ada5f..fc1e2a725a8a2 100644 --- a/src/include/cephfs/libcephfs.h +++ b/src/include/cephfs/libcephfs.h @@ -15,6 +15,7 @@ #ifndef CEPH_LIB_H #define CEPH_LIB_H +#include #include #include #include @@ -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 /* -- 2.39.5