[Libreoffice-commits] online.git: net/Socket.cpp

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Sep 4 09:32:12 UTC 2018


 net/Socket.cpp |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 997503a8d17178bb6eaab50e796f1be1dc84bbab
Author:     Tor Lillqvist <tml at iki.fi>
AuthorDate: Tue Sep 4 12:02:20 2018 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Sep 4 12:24:48 2018 +0300

    Make this file compile for iOS
    
    Again, note that I don't claim this file (or the code-base as such)
    would make much sense for iOS as such at the moment. I just want it to
    compile for now. Baby steps etc. (And there is no public Xcode project
    to compile it even partially.)
    
    Change-Id: I1321d61e9e911c7d97c7309b78aab46d9cecec29

diff --git a/net/Socket.cpp b/net/Socket.cpp
index 2fc2a1425..98bb6b996 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -24,14 +24,18 @@
 
 #include <SigUtil.hpp>
 #include "Socket.hpp"
+#ifdef __linux
 #include "ServerSocket.hpp"
 #include "SslSocket.hpp"
+#endif
 #include "WebSocketHandler.hpp"
 
 int SocketPoll::DefaultPollTimeoutMs = 5000;
 std::atomic<bool> SocketPoll::InhibitThreadChecks(false);
 std::atomic<bool> Socket::InhibitThreadChecks(false);
 
+#ifdef __linux
+
 int Socket::createSocket(Socket::Type type)
 {
     int domain = type == Type::IPv4 ? AF_INET : AF_INET6;
@@ -216,12 +220,15 @@ void SocketPoll::insertNewWebSocketSync(const Poco::URI &uri, const std::shared_
         LOG_ERR("Failed to lookup client websocket host '" << uri.getHost() << "' skipping");
 }
 
+#endif
+
+#ifdef __linux
+
 void ServerSocket::dumpState(std::ostream& os)
 {
     os << "\t" << getFD() << "\t<accept>\n";
 }
 
-
 void SocketDisposition::execute()
 {
     // We should have hard ownership of this socket.
@@ -238,6 +245,8 @@ void SocketDisposition::execute()
 const int WebSocketHandler::InitialPingDelayMs = 25;
 const int WebSocketHandler::PingFrequencyMs = 18 * 1000;
 
+#endif
+
 void WebSocketHandler::dumpState(std::ostream& os)
 {
     os << (_shuttingDown ? "shutd " : "alive ")
@@ -272,6 +281,8 @@ void StreamSocket::send(Poco::Net::HTTPResponse& response)
     send(oss.str());
 }
 
+#ifdef __linux
+
 void SocketPoll::dumpState(std::ostream& os)
 {
     // FIXME: NOT thread-safe! _pollSockets is modified from the polling thread!
@@ -333,6 +344,8 @@ bool ServerSocket::bind(Type type, int port)
     return rc == 0;
 }
 
+#endif
+
 bool StreamSocket::parseHeader(const char *clientName,
                                Poco::MemoryInputStream &message,
                                Poco::Net::HTTPRequest &request,


More information about the Libreoffice-commits mailing list