File gconf-dbus-2.29.1-windows.patch of Package mingw64-gconf2

--- gconf-dbus-2.29.1/backends/markup-tree.c	2010-04-26 16:18:05.000000000 +0200
+++ gconf-dbus-2.29.1/backends/markup-tree.c	2010-05-27 13:20:53.000000000 +0200
@@ -34,6 +34,43 @@
 #include <stdio.h>
 #include <time.h>
 
+#ifdef G_OS_WIN32
+#include <io.h>
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+static int
+fsync (int fd)
+{
+  HANDLE h = (HANDLE) _get_osfhandle (fd);
+  DWORD err;
+
+  if (h == INVALID_HANDLE_VALUE)
+    {
+      errno = EBADF;
+      return -1;
+    }
+
+  if (!FlushFileBuffers (h))
+    {
+      err = GetLastError ();
+      switch (err)
+        {
+           case ERROR_INVALID_HANDLE:
+             errno = EINVAL;
+             break;
+
+           default:
+             errno = EIO;
+        }
+      return -1;
+    }
+
+  return 0;
+}
+#define fdatasync fsync
+#endif
+
 typedef struct
 {
   char       *locale;
--- gconf-dbus-2.29.1/gconf/gconf-dbus.c	2010-04-26 16:18:05.000000000 +0200
+++ gconf-dbus-2.29.1/gconf/gconf-dbus.c	2010-05-27 13:00:07.000000000 +0200
@@ -33,7 +33,6 @@
 #include <errno.h>
 #include <time.h>
 #include <sys/types.h>
-#include <sys/wait.h>
 #include <sys/time.h>
 #include <unistd.h>
 #include <dbus/dbus.h>
openSUSE Build Service is sponsored by