From 548c3f30d3a50396f99813a59f199129bd3ce2ce Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 2 Feb 2014 22:13:03 -0800 Subject: [PATCH] Android compile fix --- client/gui_rpc_server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/gui_rpc_server.cpp b/client/gui_rpc_server.cpp index 2185db2728..d157b9e6b4 100644 --- a/client/gui_rpc_server.cpp +++ b/client/gui_rpc_server.cpp @@ -246,7 +246,7 @@ int GUI_RPC_CONN_SET::init_unix_domain() { addr.sun_len = sizeof(addr); #endif strcpy(addr.sun_path, GUI_RPC_FILE); - socklen_t len = SUN_LEN(&addr); + socklen_t len = offsetof(sockaddr_un, sun_path) + strlen(GUI_RPC_FILE); #endif unlink(GUI_RPC_FILE); if (bind(lsock, (struct sockaddr*)&addr, len) < 0) {