mirror of
https://github.com/ceph/ceph
synced 2025-01-03 01:22:53 +00:00
compat: include proper headers for FreeBSD
Signed-off-by: Yan, Zheng <zyan@redhat.com>
This commit is contained in:
parent
be595df56c
commit
b4330832cd
@ -34,7 +34,7 @@ using namespace std;
|
||||
#include "global/global_init.h"
|
||||
#include "common/safe_io.h"
|
||||
|
||||
#ifndef DARWIN
|
||||
#if !defined(DARWIN) && !defined(__FreeBSD__)
|
||||
#include <envz.h>
|
||||
#endif // DARWIN
|
||||
|
||||
|
@ -14,6 +14,8 @@
|
||||
|
||||
#define FUSE_USE_VERSION 30
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "include/ipaddr.h"
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -17,12 +17,10 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
# ifndef DARWIN
|
||||
# include <sys/ioctl.h>
|
||||
# include <syscall.h>
|
||||
# include "../os/btrfs_ioctl.h"
|
||||
# endif
|
||||
#if defined(__linux__)
|
||||
#include <sys/ioctl.h>
|
||||
#include <syscall.h>
|
||||
#include "../os/btrfs_ioctl.h"
|
||||
#endif
|
||||
|
||||
inline int sync_filesystem(int fd)
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <sys/vfs.h>
|
||||
#endif
|
||||
|
||||
#if defined(DARWIN)
|
||||
#if defined(DARWIN) || defined(__FreeBSD__)
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#endif
|
||||
|
@ -17,6 +17,7 @@
|
||||
#ifndef CEPH_MSG_EVENTKQUEUE_H
|
||||
#define CEPH_MSG_EVENTKQUEUE_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/event.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
@ -12,7 +12,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <sys/uio.h>
|
||||
|
@ -281,7 +281,7 @@ int GenericFileStoreBackend::do_fiemap(int fd, off_t start, size_t len, struct f
|
||||
fiemap->fm_length = len + start % CEPH_PAGE_SIZE;
|
||||
fiemap->fm_flags = FIEMAP_FLAG_SYNC; /* flush extents to disk if needed */
|
||||
|
||||
#if defined(DARWIN)
|
||||
#if defined(DARWIN) || defined(__FreeBSD__)
|
||||
ret = -ENOTSUP;
|
||||
goto done_err;
|
||||
#else
|
||||
@ -305,7 +305,7 @@ int GenericFileStoreBackend::do_fiemap(int fd, off_t start, size_t len, struct f
|
||||
fiemap->fm_extent_count = fiemap->fm_mapped_extents;
|
||||
fiemap->fm_mapped_extents = 0;
|
||||
|
||||
#if defined(DARWIN)
|
||||
#if defined(DARWIN) || defined(__FreeBSD__)
|
||||
ret = -ENOTSUP;
|
||||
goto done_err;
|
||||
#else
|
||||
|
@ -11,7 +11,7 @@
|
||||
#if defined(__linux__)
|
||||
#include <limits.h>
|
||||
#define CHAIN_XATTR_MAX_NAME_LEN ((XATTR_NAME_MAX + 1) / 2)
|
||||
#elif defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#elif defined(__APPLE__)
|
||||
#include <sys/xattr.h>
|
||||
#define CHAIN_XATTR_MAX_NAME_LEN ((XATTR_MAXNAMELEN + 1) / 2)
|
||||
#else
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "XFS.h"
|
||||
#endif
|
||||
|
||||
#ifdef DARWIN
|
||||
#if defined(DARWIN) || defined(__FreeBSD__)
|
||||
#include <sys/mount.h>
|
||||
#else
|
||||
#include <sys/vfs.h>
|
||||
|
@ -19,6 +19,10 @@
|
||||
#include <getopt.h>
|
||||
#include <assert.h>
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#include "include/compat.h"
|
||||
#include "include/rbd/librbd.h"
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "Deser.hpp"
|
||||
#include <arpa/inet.h>
|
||||
#include <cstdlib>
|
||||
#if defined(DARWIN)
|
||||
#if defined(DARWIN) || defined(__FreeBSD__)
|
||||
#include <machine/endian.h>
|
||||
#else
|
||||
#include <endian.h>
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "Ser.hpp"
|
||||
#include <arpa/inet.h>
|
||||
#include <cstdlib>
|
||||
#if defined(DARWIN)
|
||||
#if defined(DARWIN) || defined(__FreeBSD__)
|
||||
#include <machine/endian.h>
|
||||
#else
|
||||
#include <endian.h>
|
||||
|
Loading…
Reference in New Issue
Block a user