[mingw-glib2: 11/68] MinGW compile fix (upstream GIT commit 854a43a3cd5cb8cc97b66d6f8f661e2a7096acda)

epienbro epienbro at fedoraproject.org
Tue Mar 6 19:52:46 UTC 2012


commit bece2af1d7517376d8f06800c8a1de99f7524371
Author: epienbro <epienbro at fedoraproject.org>
Date:   Mon Jun 22 11:45:37 2009 +0000

    MinGW compile fix (upstream GIT commit
        854a43a3cd5cb8cc97b66d6f8f661e2a7096acda)

 glib2-mingw-uih-header-compile-fix.patch |   37 ++++++++++++++++++++++++++++++
 mingw32-glib2.spec                       |    4 +++
 2 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/glib2-mingw-uih-header-compile-fix.patch b/glib2-mingw-uih-header-compile-fix.patch
new file mode 100644
index 0000000..b24090f
--- /dev/null
+++ b/glib2-mingw-uih-header-compile-fix.patch
@@ -0,0 +1,37 @@
+From 854a43a3cd5cb8cc97b66d6f8f661e2a7096acda Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Sat, 20 Jun 2009 03:18:09 +0000
+Subject: Fix build on mingw
+
+Mingw does not have sys/uio.h. This was reported in bug 585937.
+
+Author:    Matthias Clasen <mclasen at redhat.com>
+---
+diff --git a/configure.in b/configure.in
+index de0d399..d253f60 100644
+--- a/configure.in
++++ b/configure.in
+@@ -857,6 +857,7 @@ AC_CHECK_HEADERS([sys/time.h sys/times.h sys/wait.h unistd.h values.h])
+ AC_CHECK_HEADERS([sys/select.h sys/types.h stdint.h sched.h malloc.h])
+ AC_CHECK_HEADERS([sys/vfs.h sys/mount.h sys/vmount.h sys/statfs.h sys/statvfs.h])
+ AC_CHECK_HEADERS([mntent.h sys/mnttab.h sys/vfstab.h sys/mntctl.h sys/sysctl.h fstab.h])
++AC_CHECK_HEADERS([sys/uio.h])
+ 
+ # check for structure fields
+ AC_CHECK_MEMBERS([struct stat.st_mtimensec, struct stat.st_mtim.tv_nsec, struct stat.st_atimensec, struct stat.st_atim.tv_nsec, struct stat.st_ctimensec, struct stat.st_ctim.tv_nsec])
+diff --git a/gio/gsocket.c b/gio/gsocket.c
+index 0670ee4..151adb5 100644
+--- a/gio/gsocket.c
++++ b/gio/gsocket.c
+@@ -38,7 +38,9 @@
+ # include <unistd.h>
+ #endif
+ 
++#ifdef HAVE_SYS_UIO_H
+ #include <sys/uio.h>
++#endif
+ 
+ #include "gsocket.h"
+ #include "gcancellable.h"
+--
+cgit v0.8.2
diff --git a/mingw32-glib2.spec b/mingw32-glib2.spec
index b2c7f0b..3e9172a 100644
--- a/mingw32-glib2.spec
+++ b/mingw32-glib2.spec
@@ -16,6 +16,9 @@ URL:            http://www.gtk.org
 Source0:        http://download.gnome.org/sources/glib/2.21/glib-%{version}.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+# Git commit 854a43a3cd5cb8cc97b66d6f8f661e2a7096acda
+Patch0:         glib2-mingw-uih-header-compile-fix.patch
+
 BuildArch:      noarch
 
 BuildRequires:  mingw32-filesystem >= 52
@@ -51,6 +54,7 @@ Static version of the MinGW Windows GLib2 library.
 
 %prep
 %setup -q -n glib-%{version}
+%patch0 -p1
 
 
 %build


More information about the mingw mailing list