[gnome-games] libgames-support: [smclient] Some build fixes for old glib
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games] libgames-support: [smclient] Some build fixes for old glib
- Date: Thu, 9 Jul 2009 23:12:41 +0000 (UTC)
commit 73a7313fa3f2b24e12e59990f5e8ac73c04732c5
Author: Christian Persch <chpe gnome org>
Date: Sat Jul 4 21:27:01 2009 +0200
libgames-support: [smclient] Some build fixes for old glib
Add some #if checks for glib 2.12 and 2.14 so we build on older
versions.
libgames-support/eggdesktopfile.c | 8 ++++++++
libgames-support/eggsmclient-xsmp.c | 1 +
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/libgames-support/eggdesktopfile.c b/libgames-support/eggdesktopfile.c
index 6f6b946..e3d19b2 100644
--- a/libgames-support/eggdesktopfile.c
+++ b/libgames-support/eggdesktopfile.c
@@ -102,6 +102,8 @@ egg_desktop_file_new_from_data_dirs (const char *desktop_file_path,
return desktop_file;
}
+#if GLIB_CHECK_VERSION (2, 14, 0)
+
/**
* egg_desktop_file_new_from_dirs:
* @desktop_file_path: relative path to a Freedesktop-style Desktop file
@@ -138,6 +140,8 @@ egg_desktop_file_new_from_dirs (const char *desktop_file_path,
return desktop_file;
}
+#endif /* GLIB >= 2.14.0 */
+
/**
* egg_desktop_file_new_from_key_file:
* @key_file: a #GKeyFile representing a desktop file
@@ -426,9 +430,13 @@ egg_desktop_file_get_numeric (EggDesktopFile *desktop_file,
const char *key,
GError **error)
{
+#if GLIB_CHECK_VERSION (2, 12, 0)
return g_key_file_get_double (desktop_file->key_file,
EGG_DESKTOP_FILE_GROUP, key,
error);
+#else
+ return 0.0;
+#endif
}
char **
diff --git a/libgames-support/eggsmclient-xsmp.c b/libgames-support/eggsmclient-xsmp.c
index 69f96f8..c1a6fae 100644
--- a/libgames-support/eggsmclient-xsmp.c
+++ b/libgames-support/eggsmclient-xsmp.c
@@ -32,6 +32,7 @@
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <unistd.h>
#include <X11/SM/SMlib.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]