diff options
| author | Brian Cameron <brian.cameron@sun.com> | 2007-08-22 09:48:30 -0400 | 
|---|---|---|
| committer | William Jon McCann <mccann@jhu.edu> | 2007-08-22 09:48:30 -0400 | 
| commit | f19761b0e2e6649836d3514fbd007b9365756f32 (patch) | |
| tree | 4b4d3198511787299a3d6d0240a0e7195c0b02f2 /src | |
| parent | de3718f03a6e1a83c1024dad0dea5b070b1b27b4 (diff) | |
more build fixes for solaris
Diffstat (limited to 'src')
| -rw-r--r-- | src/ck-sysdeps-linux.c | 5 | ||||
| -rw-r--r-- | src/ck-sysdeps-solaris.c | 9 | 
2 files changed, 11 insertions, 3 deletions
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 <fcntl.h>  #include <unistd.h>  #include <string.h> +#include <errno.h>  #include <sys/types.h>  #include <sys/stat.h> @@ -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;  | 
