fallocateFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
ThreadContext *tc)
{
+#if NO_FALLOCATE
+ warn("Host OS cannot support calls to fallocate. Ignoring syscall");
+#else
int index = 0;
int tgt_fd = process->getSyscallArg(tc, index);
int mode = process->getSyscallArg(tc, index);
int result = fallocate(sim_fd, mode, offset, len);
if (result < 0)
return -errno;
-
+#endif
return 0;
}
defined(__FreeBSD__) || defined(__CYGWIN__) || \
defined(__NetBSD__))
+#define NO_STATFS (defined(__APPLE__) || defined(__OpenBSD__) || \
+ defined(__FreeBSD__) || defined(__NetBSD__))
+
+#define NO_FALLOCATE (defined(__APPLE__) || defined(__OpenBSD__) || \
+ defined(__FreeBSD__) || defined(__NetBSD__))
+
///
/// @file syscall_emul.hh
///
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
+#if (NO_STATFS == 0)
#include <sys/statfs.h>
+#endif
#include <sys/time.h>
#include <sys/uio.h>
#include <unistd.h>
statfsFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
ThreadContext *tc)
{
+#if NO_STATFS
+ warn("Host OS cannot support calls to statfs. Ignoring syscall");
+#else
std::string path;
int index = 0;
return -errno;
copyOutStatfsBuf<OS>(tc->getMemProxy(), bufPtr, &hostBuf);
-
+#endif
return 0;
}