Not all platforms have it.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
#include <limits.h>
#include "common/safe_io.h"
+#include "include/compat.h"
ssize_t safe_read(int fd, void *buf, size_t count)
{
#if defined(__FreeBSD__)
#define lseek64(fd, offset, whence) lseek(fd, offset, whence)
#define ENODATA 61
-#define TEMP_FAILURE_RETRY
#define MSG_MORE 0
#endif /* !__FreeBSD__ */
+#ifndef TEMP_FAILURE_RETRY
+#define TEMP_FAILURE_RETRY(expression) ({ \
+ typeof(expression) __result; \
+ do { \
+ __result = (expression); \
+ } while (__result == -1 && errno == EINTR); \
+ __result; })
+#endif
+
#endif /* !CEPH_COMPAT_H */
#include "common/safe_io.h"
#include "common/Clock.h"
#include "include/assert.h"
+#include "include/compat.h"
#define DEFAULT_MAX_NEW 100
#define DEFAULT_MAX_RECENT 10000
#include "common/config.h"
#include "include/assert.h"
#include "include/str_list.h"
+#include "include/compat.h"
#define dout_subsys ceph_subsys_mon
#undef dout_prefix
#include <locale>
#include "cls/lock/cls_lock_client.h"
+#include "include/compat.h"
int rados_tool_sync(const std::map < std::string, std::string > &opts,
std::vector<const char*> &args);