client (Android) compile fix

This commit is contained in:
David Anderson 2014-02-02 22:07:33 -08:00
parent d04179c51b
commit ff31b9dfc8
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,7 @@ int RPC_CLIENT::init_unix_domain() {
addr_un.sun_len = sizeof(addr_un); addr_un.sun_len = sizeof(addr_un);
#endif #endif
strcpy(addr_un.sun_path, GUI_RPC_FILE); strcpy(addr_un.sun_path, GUI_RPC_FILE);
socklen_t len = SUN_LEN(&addr_un); socklen_t len = offsetof(sockaddr_un, sun_path) + strlen(GUI_RPC_FILE);
if (connect(sock, (struct sockaddr*)&addr_un, len) < 0) { if (connect(sock, (struct sockaddr*)&addr_un, len) < 0) {
boinc_close_socket(sock); boinc_close_socket(sock);
return ERR_CONNECT; return ERR_CONNECT;