]> git.lizzy.rs Git - minetest.git/blobdiff - src/porting.h
src/network/connection.h: Fix race condition
[minetest.git] / src / porting.h
index ddb56cf7d3852a8fe0bfdb042fff526f0ca7e879..2a91fdd063245816e02f55a9e390002ec220830f 100644 (file)
@@ -60,7 +60,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
        #include <unistd.h>
        #include <stdint.h> //for uintptr_t
 
-#if (defined(linux) || defined(__linux) || defined(__GNU__)) && !defined(_GNU_SOURCE)
+       #if (defined(linux) || defined(__linux) || defined(__GNU__)) && !defined(_GNU_SOURCE)
                #define _GNU_SOURCE
        #endif
 
@@ -377,7 +377,7 @@ const char *getVideoDriverName(irr::video::E_DRIVER_TYPE type);
 const char *getVideoDriverFriendlyName(irr::video::E_DRIVER_TYPE type);
 #endif
 
-inline const char * getPlatformName()
+inline const char *getPlatformName()
 {
        return
 #if defined(ANDROID)
@@ -401,8 +401,12 @@ inline const char * getPlatformName()
        "AIX"
 #elif defined(__hpux)
        "HP-UX"
-#elif defined(__sun) && defined(__SVR4)
-       "Solaris"
+#elif defined(__sun) || defined(sun)
+       #if defined(__SVR4)
+               "Solaris"
+       #else
+               "SunOS"
+       #endif
 #elif defined(__CYGWIN__)
        "Cygwin"
 #elif defined(__unix__) || defined(__unix)