summaryrefslogtreecommitdiff
path: root/sysutils/medusa/patches/patch-ap
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/medusa/patches/patch-ap')
-rw-r--r--sysutils/medusa/patches/patch-ap16
1 files changed, 16 insertions, 0 deletions
diff --git a/sysutils/medusa/patches/patch-ap b/sysutils/medusa/patches/patch-ap
new file mode 100644
index 00000000000..f91e063e895
--- /dev/null
+++ b/sysutils/medusa/patches/patch-ap
@@ -0,0 +1,16 @@
+$NetBSD: patch-ap,v 1.1 2006/02/16 21:22:53 joerg Exp $
+
+--- libmedusa-internal/medusa-io-handler.c.orig 2006-02-16 20:53:47.000000000 +0000
++++ libmedusa-internal/medusa-io-handler.c
+@@ -254,7 +254,11 @@ fopen_new_with_medusa_io_handler_header
+
+ /* We open the file synchronously here to make sure the header gets
+ written before returning the FILE * */
++#if defined(__DragonFly__) && !defined(O_SYNC)
++ file_descriptor = open (file_name, O_RDWR | O_CREAT | O_FSYNC, S_IRUSR | S_IWUSR);
++#else
+ file_descriptor = open (file_name, O_RDWR | O_CREAT | O_SYNC, S_IRUSR | S_IWUSR);
++#endif
+ write_header_to_file_descriptor (file_descriptor, magic_number, version_number, 0);
+ close (file_descriptor);
+ stat (file_name, &file_info);