/cpw/tomkiewicz/masterpassword: 5c47b9fa4a5b: Fix win32 build

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Tue May 14 14:22:41 EDT 2013


Changeset: 5c47b9fa4a5b863f4faa9bdedb6e63c8965d9215
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2013-05-14 20:22 +0200
Branch:	 soc.2008.masterpassword
URL: https://hg.pidgin.im/cpw/tomkiewicz/masterpassword/rev/5c47b9fa4a5b

Description:

Fix win32 build

diffstat:

 libpurple/plugins/keyrings/internalkeyring.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (32 lines):

diff --git a/libpurple/plugins/keyrings/internalkeyring.c b/libpurple/plugins/keyrings/internalkeyring.c
--- a/libpurple/plugins/keyrings/internalkeyring.c
+++ b/libpurple/plugins/keyrings/internalkeyring.c
@@ -49,6 +49,9 @@
 
 #define INTKEYRING_PREFS "/plugins/keyrings/internal/"
 
+/* win32 build defines such macro to override read() routine */
+#undef read
+
 typedef struct
 {
 	enum
@@ -673,6 +676,8 @@ intkeyring_save(PurpleAccount *account, 
 	intkeyring_open();
 
 	if (!intkeyring_unlocked) {
+		intkeyring_request *req;
+
 		if (password == NULL) {
 			g_hash_table_remove(intkeyring_ciphertexts, account);
 			g_hash_table_remove(intkeyring_passwords, account);
@@ -681,8 +686,7 @@ intkeyring_save(PurpleAccount *account, 
 			return;
 		}
 
-		intkeyring_request *req = g_new0(intkeyring_request, 1);
-
+		req = g_new0(intkeyring_request, 1);
 		req->type = INTKEYRING_REQUEST_SAVE;
 		req->account = account;
 		req->password = g_strdup(password);



More information about the Commits mailing list