mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
davfs2: Update to 1.5.5
Switched URL to @SAVANNAH for more mirrors. Added PKG_BUILD_PARALLEL for faster compilation. Added PKG_LICENSE info. Minor reorganization for consistency between packages. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -1,17 +1,6 @@
|
||||
--- a/src/cache.c
|
||||
+++ b/src/cache.c
|
||||
@@ -58,7 +58,7 @@
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
-#include <sys/xattr.h>
|
||||
+#include <linux/xattr.h>
|
||||
|
||||
#include <ne_alloc.h>
|
||||
#include <ne_string.h>
|
||||
--- a/src/webdav.c
|
||||
+++ b/src/webdav.c
|
||||
@@ -2033,7 +2033,7 @@ ssl_verify(void *userdata, int failures,
|
||||
@@ -2037,7 +2037,7 @@ ssl_verify(void *userdata, int failures, const ne_ssl_certificate *cert)
|
||||
len = getline(&s, &n, stdin);
|
||||
if (len < 0)
|
||||
abort();
|
||||
|
||||
@@ -34,6 +34,73 @@
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
--- /dev/null
|
||||
+++ b/src/compat.h
|
||||
@@ -0,0 +1,64 @@
|
||||
+#ifndef _COMPAT_H
|
||||
+#define _COMPAT_H
|
||||
+
|
||||
+#ifndef _PATH_MOUNTED
|
||||
+# define _PATH_MOUNTED "/proc/mounts"
|
||||
+#endif
|
||||
+
|
||||
+#ifndef _PATH_MNTTAB
|
||||
+# define _PATH_MNTTAB "/etc/fstab"
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_ERROR_H
|
||||
+# include <error.h>
|
||||
+#else
|
||||
+# include <stdio.h>
|
||||
+# include <stdarg.h>
|
||||
+# include <stdlib.h>
|
||||
+# include <string.h>
|
||||
+static void error_at_line(int status, int errnum, const char *filename,
|
||||
+ unsigned int linenum, const char *format, ...)
|
||||
+{
|
||||
+ va_list ap;
|
||||
+
|
||||
+ fflush(stdout);
|
||||
+
|
||||
+ if (filename != NULL)
|
||||
+ fprintf(stderr, "%s:%u: ", filename, linenum);
|
||||
+
|
||||
+ va_start(ap, format);
|
||||
+ vfprintf(stderr, format, ap);
|
||||
+ va_end(ap);
|
||||
+
|
||||
+ if (errnum != 0)
|
||||
+ fprintf(stderr, ": %s", strerror(errnum));
|
||||
+
|
||||
+ fprintf(stderr, "\n");
|
||||
+
|
||||
+ if (status != 0)
|
||||
+ exit(status);
|
||||
+}
|
||||
+
|
||||
+#define error(status, errnum, format...) \
|
||||
+ error_at_line(status, errnum, NULL, 0, format)
|
||||
+
|
||||
+#endif /* HAVE_ERROR_H */
|
||||
+
|
||||
+#ifndef HAVE_CANONICALIZE_FILE_NAME
|
||||
+#include <limits.h>
|
||||
+#include <string.h>
|
||||
+#include <stdlib.h>
|
||||
+static char * canonicalize_file_name(const char *path)
|
||||
+{
|
||||
+ char buf[PATH_MAX] = { };
|
||||
+
|
||||
+ snprintf(buf, sizeof(buf) - 1, "%s", path);
|
||||
+
|
||||
+ if (!realpath(path, buf))
|
||||
+ return NULL;
|
||||
+
|
||||
+ return strdup(buf);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#endif /* _COMPAT_H */
|
||||
--- a/src/dav_fuse.c
|
||||
+++ b/src/dav_fuse.c
|
||||
@@ -47,6 +47,9 @@
|
||||
@@ -125,70 +192,3 @@
|
||||
}
|
||||
|
||||
session = ne_session_create(args->scheme, args->host, args->port);
|
||||
--- /dev/null
|
||||
+++ b/src/compat.h
|
||||
@@ -0,0 +1,64 @@
|
||||
+#ifndef _COMPAT_H
|
||||
+#define _COMPAT_H
|
||||
+
|
||||
+#ifndef _PATH_MOUNTED
|
||||
+# define _PATH_MOUNTED "/proc/mounts"
|
||||
+#endif
|
||||
+
|
||||
+#ifndef _PATH_MNTTAB
|
||||
+# define _PATH_MNTTAB "/etc/fstab"
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_ERROR_H
|
||||
+# include <error.h>
|
||||
+#else
|
||||
+# include <stdio.h>
|
||||
+# include <stdarg.h>
|
||||
+# include <stdlib.h>
|
||||
+# include <string.h>
|
||||
+static void error_at_line(int status, int errnum, const char *filename,
|
||||
+ unsigned int linenum, const char *format, ...)
|
||||
+{
|
||||
+ va_list ap;
|
||||
+
|
||||
+ fflush(stdout);
|
||||
+
|
||||
+ if (filename != NULL)
|
||||
+ fprintf(stderr, "%s:%u: ", filename, linenum);
|
||||
+
|
||||
+ va_start(ap, format);
|
||||
+ vfprintf(stderr, format, ap);
|
||||
+ va_end(ap);
|
||||
+
|
||||
+ if (errnum != 0)
|
||||
+ fprintf(stderr, ": %s", strerror(errnum));
|
||||
+
|
||||
+ fprintf(stderr, "\n");
|
||||
+
|
||||
+ if (status != 0)
|
||||
+ exit(status);
|
||||
+}
|
||||
+
|
||||
+#define error(status, errnum, format...) \
|
||||
+ error_at_line(status, errnum, NULL, 0, format)
|
||||
+
|
||||
+#endif /* HAVE_ERROR_H */
|
||||
+
|
||||
+#ifndef HAVE_CANONICALIZE_FILE_NAME
|
||||
+#include <limits.h>
|
||||
+#include <string.h>
|
||||
+#include <stdlib.h>
|
||||
+static char * canonicalize_file_name(const char *path)
|
||||
+{
|
||||
+ char buf[PATH_MAX] = { };
|
||||
+
|
||||
+ snprintf(buf, sizeof(buf) - 1, "%s", path);
|
||||
+
|
||||
+ if (!realpath(path, buf))
|
||||
+ return NULL;
|
||||
+
|
||||
+ return strdup(buf);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#endif /* _COMPAT_H */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -32,8 +32,7 @@ mount_davfs_SOURCES = cache.c dav_coda.c
|
||||
@@ -32,8 +32,7 @@ mount_davfs_SOURCES = cache.c dav_coda.c \
|
||||
kernel_interface.h mount_davfs.h webdav.h
|
||||
umount_davfs_SOURCES = umount_davfs.c defaults.h
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
diff --git a/src/webdav.c b/src/webdav.c
|
||||
index 1ff7c7f..74cd957 100644
|
||||
--- a/src/webdav.c
|
||||
+++ b/src/webdav.c
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
Reference in New Issue
Block a user