[PATCH] Fix build on GNU Hurd

Emilio Pozuelo Monfort pochu27 at gmail.com
Sat Mar 26 07:28:14 UTC 2011


https://bugs.freedesktop.org/show_bug.cgi?id=35685
---
 src/programs/pkexec.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c
index 9217954..e319c54 100644
--- a/src/programs/pkexec.c
+++ b/src/programs/pkexec.c
@@ -49,7 +49,7 @@
 #include <polkitagent/polkitagent.h>
 
 static gchar *original_user_name = NULL;
-static gchar original_cwd[PATH_MAX];
+static gchar *original_cwd;
 static gchar *command_line = NULL;
 static struct passwd *pw;
 
@@ -452,7 +452,7 @@ main (int argc, char *argv[])
       goto out;
     }
 
-  if (getcwd (original_cwd, sizeof (original_cwd)) == NULL)
+  if ((original_cwd = g_get_current_dir ()) == NULL)
     {
       g_printerr ("Error getting cwd: %s\n",
                   g_strerror (errno));
@@ -904,6 +904,7 @@ main (int argc, char *argv[])
       g_ptr_array_free (saved_env, TRUE);
     }
 
+  g_free (original_cwd);
   g_free (path);
   g_free (command_line);
   g_free (opt_user);
-- 
1.7.4.1


--------------010704010103060703000705--





More information about the Pkg-utopia-maintainers mailing list