summaryrefslogtreecommitdiffstats
path: root/sysutils/gksu/files/patch-gksu_gksu.c
diff options
context:
space:
mode:
authormezz <mezz@df743ca5-7f9a-e211-a948-0013205c9059>2007-08-07 04:10:40 +0800
committermezz <mezz@df743ca5-7f9a-e211-a948-0013205c9059>2007-08-07 04:10:40 +0800
commitf238036af3558cf1fad54bd9a5b37864fc0ebe97 (patch)
treeda161c899e5f85b417d0274837579d0cecbcfe5e /sysutils/gksu/files/patch-gksu_gksu.c
parent79bbd201d44523a91548d6db7c9eb7b206d6d5b0 (diff)
downloadmarcuscom-ports-f238036af3558cf1fad54bd9a5b37864fc0ebe97.tar
marcuscom-ports-f238036af3558cf1fad54bd9a5b37864fc0ebe97.tar.gz
marcuscom-ports-f238036af3558cf1fad54bd9a5b37864fc0ebe97.tar.bz2
marcuscom-ports-f238036af3558cf1fad54bd9a5b37864fc0ebe97.tar.lz
marcuscom-ports-f238036af3558cf1fad54bd9a5b37864fc0ebe97.tar.xz
marcuscom-ports-f238036af3558cf1fad54bd9a5b37864fc0ebe97.tar.zst
marcuscom-ports-f238036af3558cf1fad54bd9a5b37864fc0ebe97.zip
share/gnome/ -> share/.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@9361 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/gksu/files/patch-gksu_gksu.c')
-rw-r--r--sysutils/gksu/files/patch-gksu_gksu.c82
1 files changed, 82 insertions, 0 deletions
diff --git a/sysutils/gksu/files/patch-gksu_gksu.c b/sysutils/gksu/files/patch-gksu_gksu.c
new file mode 100644
index 000000000..5df2cac05
--- /dev/null
+++ b/sysutils/gksu/files/patch-gksu_gksu.c
@@ -0,0 +1,82 @@
+--- gksu/gksu.c.orig Wed Mar 29 06:18:28 2006
++++ gksu/gksu.c Mon May 22 16:29:36 2006
+@@ -513,6 +513,7 @@
+
+ pid_t test_lock(const char* fname)
+ {
++ struct flock fl;
+ int FD = open(fname, 0);
+ if(FD < 0) {
+ if(errno == ENOENT) {
+@@ -523,7 +524,6 @@
+ return(-1);
+ }
+ }
+- struct flock fl;
+ fl.l_type = F_WRLCK;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+@@ -543,6 +543,7 @@
+
+ int get_lock(const char *File)
+ {
++ struct flock fl;
+ int FD = open(File,O_RDWR | O_CREAT | O_TRUNC,0640);
+ if (FD < 0)
+ {
+@@ -560,13 +561,13 @@
+ fcntl(FD,F_SETFD, FD_CLOEXEC);
+
+ // Aquire a write lock
+- struct flock fl;
+ fl.l_type = F_WRLCK;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 0;
+ if (fcntl(FD,F_SETLK,&fl) == -1)
+ {
++ int Tmp;
+ if (errno == ENOLCK)
+ {
+ g_warning(_("Not using locking for nfs mounted lock file %s"), File);
+@@ -575,7 +576,7 @@
+ return dup(0); // Need something for the caller to close
+ }
+
+- int Tmp = errno;
++ Tmp = errno;
+ close(FD);
+ errno = Tmp;
+ return -1;
+@@ -773,6 +774,7 @@
+ GtkWidget *dialog = GTK_WIDGET(data);
+
+ int retvalue = 0;
++ int lock = 0;
+
+ if (prompt)
+ gksuui_dialog_set_prompt (GKSUUI_DIALOG(dialog), prompt);
+@@ -796,7 +798,6 @@
+ g_free (msg);
+ }
+
+- int lock = 0;
+ if (grab)
+ lock = grab_keyboard_and_mouse (dialog);
+ retvalue = gtk_dialog_run (GTK_DIALOG(dialog));
+@@ -1220,6 +1221,7 @@
+
+ if (print_pass)
+ {
++ int lock = 0;
+ if (!gksuui_dialog_get_message (GKSUUI_DIALOG(dialog)))
+ {
+ gchar *msg =
+@@ -1230,7 +1232,6 @@
+ g_free (msg);
+ }
+
+- int lock = 0;
+ if (grab)
+ lock = grab_keyboard_and_mouse (dialog);
+ retvalue = gtk_dialog_run (GTK_DIALOG(dialog));