diff options
Diffstat (limited to '')
-rw-r--r-- | src/net/SocketUtil.cxx (renamed from src/system/SocketUtil.cxx) | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/system/SocketUtil.cxx b/src/net/SocketUtil.cxx index b9df0d59d..b2ea63985 100644 --- a/src/system/SocketUtil.cxx +++ b/src/net/SocketUtil.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -19,25 +19,19 @@ #include "config.h" #include "SocketUtil.hxx" +#include "SocketAddress.hxx" #include "SocketError.hxx" -#include "fd_util.h" +#include "system/fd_util.h" #include <unistd.h> -#ifndef WIN32 -#include <sys/socket.h> -#else -#include <ws2tcpip.h> -#include <winsock.h> -#endif - #ifdef HAVE_IPV6 #include <string.h> #endif int socket_bind_listen(int domain, int type, int protocol, - const struct sockaddr *address, size_t address_length, + SocketAddress address, int backlog, Error &error) { @@ -60,7 +54,7 @@ socket_bind_listen(int domain, int type, int protocol, return -1; } - ret = bind(fd, address, address_length); + ret = bind(fd, address.GetAddress(), address.GetSize()); if (ret < 0) { SetSocketError(error); close_socket(fd); |