From f19761b0e2e6649836d3514fbd007b9365756f32 Mon Sep 17 00:00:00 2001 From: Brian Cameron Date: Wed, 22 Aug 2007 09:48:30 -0400 Subject: more build fixes for solaris --- src/ck-sysdeps-linux.c | 5 ++++- src/ck-sysdeps-solaris.c | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ck-sysdeps-linux.c b/src/ck-sysdeps-linux.c index 0ff0fe6..fcf3b4e 100644 --- a/src/ck-sysdeps-linux.c +++ b/src/ck-sysdeps-linux.c @@ -488,7 +488,10 @@ ck_unix_pid_get_env_hash (pid_t pid) char **vals; vals = g_strsplit (contents + i, "=", 2); if (vals != NULL) { - g_hash_table_insert (hash, vals[0], vals[1]); + g_hash_table_insert (hash, + g_strdup (vals[0]), + g_strdup (vals[1])); + g_strfreev (vals); } } last_was_null = FALSE; diff --git a/src/ck-sysdeps-solaris.c b/src/ck-sysdeps-solaris.c index ba7d5aa..83a28f8 100644 --- a/src/ck-sysdeps-solaris.c +++ b/src/ck-sysdeps-solaris.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -111,7 +112,7 @@ ck_process_stat_get_tty (CkProcessStat *stat) g_return_val_if_fail (stat != NULL, NULL); - return stat->tty_text; + return g_strdup (stat->tty_text); } /* return 1 if it works, or 0 for failure */ @@ -252,7 +253,10 @@ ck_unix_pid_get_env_hash (pid_t pid) char **vals; vals = g_strsplit (buf, "=", 2); if (vals != NULL) { - g_hash_table_insert (hash, vals[0], vals[1]); + g_hash_table_insert (hash, + g_strdup (vals[0]), + g_strdup (vals[1])); + g_strfreev (vals); } } } @@ -334,6 +338,7 @@ ck_get_max_num_consoles (guint *num) GError *error; char *svcprop_stdout; int status; + int max_consoles; gboolean res; gboolean ret; -- cgit