diff --git a/libretroshare/src/pqi/pqinetwork.cc b/libretroshare/src/pqi/pqinetwork.cc index b54408fd3..0ec2377c1 100644 --- a/libretroshare/src/pqi/pqinetwork.cc +++ b/libretroshare/src/pqi/pqinetwork.cc @@ -850,16 +850,14 @@ int unix_close(int fd) return ret; } -int unix_socket(int /*domain*/, int /*type*/, int /*protocol*/) +int unix_socket(int domain, int type, int protocol) { - int osock = socket(PF_INET, SOCK_STREAM, 0); - -/******************* WINDOWS SPECIFIC PART ******************/ -#ifdef WINDOWS_SYS // WINDOWS + int osock = socket(domain, type, protocol); +#ifdef WINDOWS_SYS #ifdef NET_DEBUG std::cerr << "unix_socket()" << std::endl; -#endif +#endif // NET_DEBUG if ((unsigned) osock == INVALID_SOCKET) { @@ -867,8 +865,8 @@ int unix_socket(int /*domain*/, int /*type*/, int /*protocol*/) osock = -1; errno = WinToUnixError(WSAGetLastError()); } -#endif -/******************* WINDOWS SPECIFIC PART ******************/ +#endif // WINDOWS_SYS + return osock; }