mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-11 07:40:21 -04:00
rebased patch 0002-Respect-passed-parameters-in-unix_socket.patch to new IPv6 branch
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-IPv6-2@8234 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
87f932f3a4
commit
9ed1f2f466
1 changed files with 6 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue