Master server, linux

I have faced many problems with master server on linux, then I found a good guide(http://answers.unity3d.com/questions/429957/unity-master-server-ubuntu-build-problem.html)And now when I try to run “make ./MasterServer”, I get some problems)

g++ -ggdb -I. -IRakNet/Sources -ICommon -Wall -lpthread -DUNITY_MASTERSERVER Common/Log.o Common/Utility.o RakNet/Sources/RakNetworkFactory.o RakNet/Sources/BitStream.o RakNet/Sources/GetTime.o RakNet/Sources/RakPeer.o RakNet/Sources/BitStream_NoTemplate.o RakNet/Sources/RakSleep.o RakNet/Sources/CheckSum.o RakNet/Sources/Rand.o RakNet/Sources/ReliabilityLayer.o RakNet/Sources/LinuxStrings.o RakNet/Sources/ConsoleServer.o RakNet/Sources/Router.o RakNet/Sources/DS_BytePool.o RakNet/Sources/MessageFilter.o RakNet/Sources/SHA1.o RakNet/Sources/DS_ByteQueue.o RakNet/Sources/SimpleMutex.o RakNet/Sources/DS_HuffmanEncodingTree.o RakNet/Sources/NetworkIDManager.o RakNet/Sources/SocketLayer.o RakNet/Sources/DS_Table.o RakNet/Sources/NetworkIDObject.o RakNet/Sources/StringCompressor.o RakNet/Sources/DataBlockEncryptor.o RakNet/Sources/StringTable.o RakNet/Sources/DataCompressor.o RakNet/Sources/PacketFileLogger.o RakNet/Sources/SystemAddressList.o RakNet/Sources/DirectoryDeltaTransfer.o RakNet/Sources/PacketLogger.o RakNet/Sources/TCPInterface.o RakNet/Sources/EmailSender.o RakNet/Sources/TableSerializer.o RakNet/Sources/EncodeClassName.o RakNet/Sources/RPCMap.o RakNet/Sources/TelnetTransport.o RakNet/Sources/ExtendedOverlappedPool.o RakNet/Sources/RakNetCommandParser.o RakNet/Sources/ThreadsafePacketLogger.o RakNet/Sources/FileList.o RakNet/Sources/RakNetStatistics.o RakNet/Sources/_FindFirst.o RakNet/Sources/FileListTransfer.o RakNet/Sources/RakNetTransport.o RakNet/Sources/rijndael.o RakNet/Sources/FileOperations.o RakNet/Sources/RakNetTypes.o RakNet/Sources/BigInt.o RakNet/Sources/CCRakNetUDT.o RakNet/Sources/RakNetSocket.o RakNet/Sources/RakString.o RakNet/Sources/RSACrypt.o RakNet/Sources/RakMemoryOverride.o RakNet/Sources/SignaledEvent.o RakNet/Sources/SuperFastHash.o RakNet/Sources/PluginInterface2.o RakNet/Sources/Itoa.o RakNet/Sources/RakThread.o RakNet/Sources/LightweightDatabaseCommon.o RakNet/Sources/LightweightDatabaseServer.o MasterServer.cpp -o MasterServer
    In file included from MasterServer.cpp:10:0:
    MasterServer.h:2:15: warning: extra tokens at end of #ifndef directive [enabled by default]
     #ifndef WIN32 #include <unistd.h> #endif
                   ^
    MasterServer.h:2:0: error: unterminated #ifndef
     #ifndef WIN32 #include <unistd.h> #endif
     ^
    MasterServer.cpp:28:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
     char* logfile = "masterserver.log";
                     ^
    MasterServer.cpp: In function 'int main(int, char**)':
    MasterServer.cpp:202:14: error: 'daemon' was not declared in this scope
       daemon(1, 0);
                  ^
    MasterServer.cpp:259:13: warning: the address of 'pidFile' will always evaluate as 'true' [-Waddress]
      if (pidFile)
                 ^
    make: *** [MasterServer] Error 1

What shoul I do?

Add to the top of the file:
#include <unistd.h>

Just created a quite lengthy answer here: Unity Master Server - Ubuntu build problem - Unity Answers

I’m not going to repost it, too big for that.