ports/net-mgmt/seafile-client/files/patch-common_obj-backend-fs.c
Thomas Zander 6cfe79ca6f Move net-mgmt/seafile to net-mgmt/seafile-client, update to version 6.0.1
PR:		215360
Submitted by:	Ultima1252@gmail.com (maintainer of net-mgmt/seafile)
2016-12-26 14:56:02 +00:00

20 lines
737 B
C

--- common/obj-backend-fs.c.orig 2015-09-21 03:42:11 UTC
+++ common/obj-backend-fs.c
@@ -101,7 +101,7 @@ obj_backend_fs_read (ObjBackend *bend,
static int
fsync_obj_contents (int fd)
{
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
/* Some file systems may not support fsync().
* In this case, just skip the error.
*/
@@ -153,7 +153,7 @@ fsync_obj_contents (int fd)
static int
rename_and_sync (const char *tmp_path, const char *obj_path)
{
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
char *parent_dir;
int ret = 0;