Commit 22bf663a authored by Greg Williams's avatar Greg Williams
Browse files

Added some platform specific stuff for getting hostname and other stuff necessary for Linux builds

parent e53d4cbd
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -51,6 +51,14 @@
    #endif
#endif

// Define max host name length
#if !defined(__APPLE__) && defined(__unix__)
    // Some Linux environments require this, although not all, but it's benign.
    #ifndef _BSD_SOURCE
        #define _BSD_SOURCE
    #endif // _BSD_SOURCE
    #include <unistd.h>
#endif  // __unix__
#ifndef HOST_NAME_MAX
    #define HOST_NAME_MAX 256
#endif // HOST_NAME_MAX