compile fix for fuse_lo-plus
authorMiklos Szeredi <mszeredi@suse.cz>
Tue, 18 Mar 2014 11:01:45 +0000 (12:01 +0100)
committerMiklos Szeredi <mszeredi@suse.cz>
Tue, 18 Mar 2014 11:01:45 +0000 (12:01 +0100)
configure.ac
example/fuse_lo-plus.c

index 8c1d3a8c9103f41c9ca086f24579edc4c64dcf41..14d64b62a3188bff80693307cddfba45c9d29de6 100644 (file)
@@ -54,7 +54,7 @@ if test "$enable_mtab" = "no"; then
 fi
 
 AC_CHECK_FUNCS([fork setxattr fdatasync splice vmsplice utimensat pipe2])
-AC_CHECK_FUNCS([posix_fallocate fstatat])
+AC_CHECK_FUNCS([posix_fallocate fstatat openat readlinkat])
 AC_CHECK_MEMBERS([struct stat.st_atim])
 AC_CHECK_MEMBERS([struct stat.st_atimespec])
 
index fcc1eee270b5c19991216b67d77e4929b68d4ffa..adbbbeecadc12d7add3a94e46823da24649195a5 100644 (file)
 #include <errno.h>
 #include <err.h>
 
+/* Compat stuff.  Doesn't make it work, just makes it compile. */
+#ifndef HAVE_FSTATAT
+#warning fstatat(2) needed by this program
+int fstatat(int dirfd, const char *pathname, struct stat *buf, int flags)
+{
+       errno = ENOSYS;
+       return -1;
+}
+#endif
+#ifndef HAVE_OPENAT
+#warning openat(2) needed by this program
+int openat(int dirfd, const char *pathname, int flags, ...)
+{
+       errno = ENOSYS;
+       return -1;
+}
+#endif
+#ifndef HAVE_READLINKAT
+#warning readlinkat(2) needed by this program
+ssize_t readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz)
+{
+       errno = ENOSYS;
+       return -1;
+}
+#endif
+#ifndef AT_EMPTY_PATH
+#warning AT_EMPTY_PATH needed by this program
+#define AT_EMPTY_PATH 0
+#endif
+#ifndef AT_SYMLINK_NOFOLLOW
+#warning AT_SYMLINK_NOFOLLOW needed by this program
+#define AT_SYMLINK_NOFOLLOW 0
+#endif
+#ifndef O_PATH
+#warning O_PATH needed by this program
+#define O_PATH 0
+#endif
+#ifndef O_NOFOLLOW
+#warning O_NOFOLLOW needed by this program
+#define O_NOFOLLOW 0
+#endif
+
 struct lo_inode {
        struct lo_inode *next;
        struct lo_inode *prev;