[ostree] Drop glib requrirement to 2.28



commit 03943c659f70f01daf2d6ab8d6029086269ac582
Author: Colin Walters <walters verbum org>
Date:   Wed Oct 26 14:10:20 2011 -0400

    Drop glib requrirement to 2.28
    
    This lets it build on more currently-released systems like Fedora 15.

 configure.ac                    |    2 +-
 src/libostree/ostree-checkout.c |    2 +-
 src/libostree/ostree-repo.c     |    4 +++-
 src/libotutil/ot-gio-utils.c    |    1 -
 src/libotutil/ot-unix-utils.c   |    3 +--
 src/libotutil/ot-unix-utils.h   |    2 +-
 src/main.c                      |    1 -
 7 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c487ff1..be78b1f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,7 @@ LT_INIT
 
 PKG_PROG_PKG_CONFIG
 
-PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0 >= 2.30])
+PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0 >= 2.28])
 
 AM_PATH_PYTHON
 
diff --git a/src/libostree/ostree-checkout.c b/src/libostree/ostree-checkout.c
index 7fb7bd3..e4f09fb 100644
--- a/src/libostree/ostree-checkout.c
+++ b/src/libostree/ostree-checkout.c
@@ -268,7 +268,7 @@ check_trigger (OstreeCheckout *self,
     goto out;
   datain = g_data_input_stream_new (instream);
 
-  while ((line = g_data_input_stream_read_line_utf8 (datain, &len, NULL, &temp_error)) != NULL)
+  while ((line = g_data_input_stream_read_line (datain, &len, NULL, &temp_error)) != NULL)
     {
       if (g_str_has_prefix (line, "# IfExecutable: "))
         {
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index 689285c..2fbe308 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -19,6 +19,8 @@
  * Author: Colin Walters <walters verbum org>
  */
 
+#define _GNU_SOURCE
+
 #include "config.h"
 
 #include "ostree.h"
@@ -265,7 +267,7 @@ import_gvariant_object (OstreeRepo  *self,
   serialized = g_variant_new ("(uv)", (guint32)type, variant);
 
   tmp_name = g_build_filename (priv->objects_path, "variant-tmp-XXXXXX", NULL);
-  fd = mkstemp (tmp_name);
+  fd = g_mkstemp (tmp_name);
   if (fd < 0)
     {
       ot_util_set_error_from_errno (error, errno);
diff --git a/src/libotutil/ot-gio-utils.c b/src/libotutil/ot-gio-utils.c
index 0d49075..7663d4d 100644
--- a/src/libotutil/ot-gio-utils.c
+++ b/src/libotutil/ot-gio-utils.c
@@ -21,7 +21,6 @@
 
 #include "config.h"
 
-#include <glib-unix.h>
 #include <gio/gio.h>
 #include <gio/gunixinputstream.h>
 
diff --git a/src/libotutil/ot-unix-utils.c b/src/libotutil/ot-unix-utils.c
index 95cdb8d..e1e8972 100644
--- a/src/libotutil/ot-unix-utils.c
+++ b/src/libotutil/ot-unix-utils.c
@@ -23,7 +23,6 @@
 
 #include "ot-unix-utils.h"
 
-#include <glib-unix.h>
 #include <gio/gio.h>
 #include <gio/gunixoutputstream.h>
 
@@ -205,7 +204,7 @@ ot_util_set_error_from_errno (GError **error,
                               gint     saved_errno)
 {
   g_set_error_literal (error,
-                       G_UNIX_ERROR,
+                       G_IO_ERROR,
                        0,
                        g_strerror (saved_errno));
   errno = saved_errno;
diff --git a/src/libotutil/ot-unix-utils.h b/src/libotutil/ot-unix-utils.h
index dbbf8c0..0e1d392 100644
--- a/src/libotutil/ot-unix-utils.h
+++ b/src/libotutil/ot-unix-utils.h
@@ -23,10 +23,10 @@
 #define __OSTREE_UNIX_UTILS_H__
 
 #include <gio/gio.h>
-#include <glib-unix.h>
 
 /* I just put all this shit here. Sue me. */
 #include <sys/types.h>
+#include <errno.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <dirent.h>
diff --git a/src/main.c b/src/main.c
index e0a813d..5936fc3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -21,7 +21,6 @@
 
 #include "config.h"
 
-#include <glib-unix.h>
 #include <gio/gio.h>
 
 #include <string.h>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]