diff options
author | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-22 00:57:18 +0000 |
---|---|---|
committer | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-22 00:57:18 +0000 |
commit | 8f8459533be2c9954e2bec948dee7570d50b094d (patch) | |
tree | d038e7a74adeb83c473f2f87638c7f8f889a5dc6 /src/socket.cpp | |
parent | f7f9192f902e5972707bdd65aed939e884a48a93 (diff) |
Fixed to compile properly with -O; keep in mind that this is not supported, use at your own risk.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6058 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socket.cpp')
-rw-r--r-- | src/socket.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/socket.cpp b/src/socket.cpp index b286ee96f..70356be6c 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -271,19 +271,18 @@ bool irc::sockets::MatchCIDR(const char* address, const char* cidr_mask, bool ma return MatchCIDRBits(addr_raw, mask_raw, bits); } -inline void irc::sockets::Blocking(int s) +void irc::sockets::Blocking(int s) { int flags = fcntl(s, F_GETFL, 0); fcntl(s, F_SETFL, flags ^ O_NONBLOCK); } -inline void irc::sockets::NonBlocking(int s) +void irc::sockets::NonBlocking(int s) { int flags = fcntl(s, F_GETFL, 0); fcntl(s, F_SETFL, flags | O_NONBLOCK); } - /** This will bind a socket to a port. It works for UDP/TCP. * It can only bind to IP addresses, if you wish to bind to hostnames * you should first resolve them using class 'Resolver'. |