aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Curtin <ericcurtin17@gmail.com>2020-01-29 15:05:05 +0000
committerEric Curtin <ericcurtin17@gmail.com>2020-01-29 15:56:35 +0000
commit349ec97fcaf6418bf6e88fddbc861fc70e76506a (patch)
treed87727b5f9e50477b026507a75c264631f0f5b38
parent645074485ea55b443fd3072c403301bbf047b4f0 (diff)
downloadinotify-tools-349ec97fcaf6418bf6e88fddbc861fc70e76506a.zip
inotify-tools-349ec97fcaf6418bf6e88fddbc861fc70e76506a.tar.gz
inotify-tools-349ec97fcaf6418bf6e88fddbc861fc70e76506a.tar.bz2
Use stat and lstat if stat64 is not available in common.c also
-rw-r--r--libinotifytools/src/inotifytools/inotify-nosys.h2
-rw-r--r--libinotifytools/src/inotifytools/inotifytools.h5
-rw-r--r--src/common.h5
3 files changed, 11 insertions, 1 deletions
diff --git a/libinotifytools/src/inotifytools/inotify-nosys.h b/libinotifytools/src/inotifytools/inotify-nosys.h
index 592fad0..98fff47 100644
--- a/libinotifytools/src/inotifytools/inotify-nosys.h
+++ b/libinotifytools/src/inotifytools/inotify-nosys.h
@@ -13,7 +13,7 @@
#include <sys/syscall.h>
#include <unistd.h>
-#ifndef stat64
+#ifdef __FreeBSD__
#define stat64 stat
#define lstat64 lstat
#endif
diff --git a/libinotifytools/src/inotifytools/inotifytools.h b/libinotifytools/src/inotifytools/inotifytools.h
index 981a8b0..b99971a 100644
--- a/libinotifytools/src/inotifytools/inotifytools.h
+++ b/libinotifytools/src/inotifytools/inotifytools.h
@@ -1,6 +1,11 @@
#ifndef _inotifytools_H
#define _inotifytools_H
+#ifdef __FreeBSD__
+#define stat64 stat
+#define lstat64 lstat
+#endif
+
#ifdef __cplusplus
extern "C"
{
diff --git a/src/common.h b/src/common.h
index d91f91d..ddafc29 100644
--- a/src/common.h
+++ b/src/common.h
@@ -1,6 +1,11 @@
#ifndef COMMON_H
#define COMMON_H
+#ifdef __FreeBSD__
+#define stat64 stat
+#define lstat64 lstat
+#endif
+
#include <stdbool.h>
#define BLOCKING_TIMEOUT -1