summaryrefslogtreecommitdiff
path: root/extra/subversion/subversion-1.7.6-kwallet-gcc47.patch
blob: a571c3c3cc0c361ed3424b5ee7e9f082391f2333 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
diff -Naur subversion-1.7.5.ori/subversion/libsvn_auth_kwallet/kwallet.cpp subversion-1.7.5/subversion/libsvn_auth_kwallet/kwallet.cpp
--- subversion-1.7.5.ori/subversion/libsvn_auth_kwallet/kwallet.cpp	2010-12-30 15:46:50.000000000 -0500
+++ subversion-1.7.5/subversion/libsvn_auth_kwallet/kwallet.cpp	2012-08-14 19:43:16.694275908 -0400
@@ -60,6 +60,9 @@
 /* KWallet simple provider, puts passwords in KWallet                    */
 /*-----------------------------------------------------------------------*/
 
+static int q_argc = 1;
+static char q_argv0[] = "svn"; // Build non-const char * from string constant
+static char *q_argv[] = { q_argv0 };
 
 static const char *
 get_application_name(apr_hash_t *parameters,
@@ -175,6 +178,10 @@
                    "kwallet-initialized",
                    APR_HASH_KEY_STRING,
                    NULL);
+      apr_hash_set(parameters,
+                   "kwallet-wallet",
+                   APR_HASH_KEY_STRING,
+                   NULL);
     }
   return APR_SUCCESS;
 }
@@ -203,12 +210,11 @@
   QCoreApplication *app;
   if (! qApp)
     {
-      int argc = 1;
-      app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"});
+      int argc = q_argc;
+      app = new QCoreApplication(argc, q_argv);
     }
 
-  KCmdLineArgs::init(1,
-                     (char *[1]) {(char *) "svn"},
+  KCmdLineArgs::init(q_argc, q_argv,
                      get_application_name(parameters, pool),
                      "subversion",
                      ki18n(get_application_name(parameters, pool)),
@@ -273,12 +279,11 @@
   QCoreApplication *app;
   if (! qApp)
     {
-      int argc = 1;
-      app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"});
+      int argc = q_argc;
+      app = new QCoreApplication(argc, q_argv);
     }
 
-  KCmdLineArgs::init(1,
-                     (char *[1]) {(char *) "svn"},
+  KCmdLineArgs::init(q_argc, q_argv,
                      get_application_name(parameters, pool),
                      "subversion",
                      ki18n(get_application_name(parameters, pool)),