Fix Linux build.

Fix Linux build.

diff --git a/src/engine/console/consoleCurses.cpp b/src/engine/console/consoleCurses.cpp
index a06de16..a5d1c74 100644
--- a/src/engine/console/consoleCurses.cpp
+++ b/src/engine/console/consoleCurses.cpp
@@ -457,7 +457,7 @@ void idConsoleCursesLocal::Init( void )
     
 #ifndef _WIN32
     // Catch window resizes
-    signal( SIGWINCH, static_cast<void*>( Resize ) );
+    signal( SIGWINCH, static_cast<void*>( reinterpret_cast<void *&>( Resize ) ) );
 #endif
     
     curses_on = true;
diff --git a/src/engine/platform/systemMain.cpp b/src/engine/platform/systemMain.cpp
index 7e4b1e7..5e391ef 100644
--- a/src/engine/platform/systemMain.cpp
+++ b/src/engine/platform/systemMain.cpp
@@ -666,6 +666,7 @@ Q_EXPORT sint engineMain( sint argc, valueType * *argv )
     
     if( _setjmp( sys_exitframe ) )
     {
+#ifdef _WIN32
         __try
         {
 #if !defined (DEDICATED) && !defined (UPDATE_SERVER)
@@ -677,7 +678,22 @@ Q_EXPORT sint engineMain( sint argc, valueType * *argv )
         {
             Com_ReleaseMemory();
         }
-        
+#else
+        try
+        {
+#if !defined (DEDICATED) && !defined (UPDATE_SERVER)
+            soundSystem->Shutdown();
+            CL_ShutdownRef();
+#endif
+        }
+
+        catch (...)
+        {
+            Com_ReleaseMemory();
+        }
+
+        Com_ReleaseMemory();
+#endif
         return sys_retcode;
     }
     
diff --git a/src/engine/qcommon/q_math.cpp b/src/engine/qcommon/q_math.cpp
index c9c4d0a..c9a68ca 100644
--- a/src/engine/qcommon/q_math.cpp
+++ b/src/engine/qcommon/q_math.cpp
@@ -53,9 +53,7 @@
 #endif // !GAMEDLL
 
 // *INDENT-OFF*
-#if defined (_WIN32)
 vec3_t vec3_origin = {0, 0, 0};
-#endif
 
 vec3_t axisDefault[3] = { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 } };
 

GitHub
sha: 29a2a25d