diff options
author | gulin <gulin@yandex-team.ru> | 2022-02-10 16:47:32 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:32 +0300 |
commit | 7199613d295246a07c2f7b331fbb3128936039dc (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /util/network/init.h | |
parent | c807aae441c17fc7f577c35757a4b6e0bd909802 (diff) | |
download | ydb-7199613d295246a07c2f7b331fbb3128936039dc.tar.gz |
Restoring authorship annotation for <gulin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/network/init.h')
-rw-r--r-- | util/network/init.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/util/network/init.h b/util/network/init.h index 7d5c1dc0ab..08a79c0fca 100644 --- a/util/network/init.h +++ b/util/network/init.h @@ -1,35 +1,35 @@ #pragma once - + #include <util/system/error.h> - -#if defined(_unix_) + +#if defined(_unix_) #include <fcntl.h> #include <netdb.h> #include <time.h> #include <unistd.h> #include <poll.h> - + #include <sys/uio.h> #include <sys/time.h> #include <sys/types.h> #include <sys/socket.h> - + #include <netinet/in.h> #include <netinet/tcp.h> #include <arpa/inet.h> - + using SOCKET = int; - + #define closesocket(s) close(s) #define SOCKET_ERROR -1 #define INVALID_SOCKET -1 #define WSAGetLastError() errno -#elif defined(_win_) +#elif defined(_win_) #include <util/system/winint.h> #include <io.h> #include <winsock2.h> #include <ws2tcpip.h> - + using nfds_t = ULONG; #undef Yield @@ -50,9 +50,9 @@ struct sockaddr_un { #define MSG_NOSIGNAL 0 #endif #endif // _win_ or _darwin_ - -void InitNetworkSubSystem(); - + +void InitNetworkSubSystem(); + static struct TNetworkInitializer { inline TNetworkInitializer() { InitNetworkSubSystem(); |