Skip to content

Commit

Permalink
qga/main.c: Don't use g_key_file_get/set_int64
Browse files Browse the repository at this point in the history
These functions don't exist until glib version 2.26. QEMU is currently only
mandating glib 2.12.

This patch replaces the functions with g_key_file_get/set_integer.

Unbreaks the build on Ubuntu 10.04 and RHEL 5.6.

Regression was introduced by 39097da

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 1363323879-682-1-git-send-email-peter.crosthwaite@xilinx.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 4f30649)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
  • Loading branch information
pete128 authored and mdroth committed Apr 2, 2013
1 parent f305d50 commit d26efd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qga/main.c
Expand Up @@ -755,7 +755,7 @@ static void persistent_state_from_keyfile(GAPersistentState *pstate,

if (g_key_file_has_key(keyfile, "global", "fd_counter", NULL)) {
pstate->fd_counter =
g_key_file_get_int64(keyfile, "global", "fd_counter", NULL);
g_key_file_get_integer(keyfile, "global", "fd_counter", NULL);
}
}

Expand All @@ -765,7 +765,7 @@ static void persistent_state_to_keyfile(const GAPersistentState *pstate,
g_assert(pstate);
g_assert(keyfile);

g_key_file_set_int64(keyfile, "global", "fd_counter", pstate->fd_counter);
g_key_file_set_integer(keyfile, "global", "fd_counter", pstate->fd_counter);
}

static gboolean write_persistent_state(const GAPersistentState *pstate,
Expand Down

0 comments on commit d26efd2

Please sign in to comment.