Fix builds with mingw x86 and x86_64.

- Deal with tmpnam_s() preproc issues in file_util.cc
  when building with mingw-w64..
- Add stdint.h include in mkvmuxer.cc.

Change-Id: I819a27e6d805d772a6e1863982a2eeafd27b2a0d
diff --git a/common/file_util.cc b/common/file_util.cc
index 252e74b..db4aad2 100644
--- a/common/file_util.cc
+++ b/common/file_util.cc
@@ -41,7 +41,12 @@
   return temp_file_name;
 #else
   char tmp_file_name[_MAX_PATH];
+#if defined _MSC_VER || defined MINGW_HAS_SECURE_API
   errno_t err = tmpnam_s(tmp_file_name);
+#else
+  char* fname_pointer = tmpnam(tmp_file_name);
+  errno_t err = (fname_pointer == &tmp_file_name[0]) ? 0 : -1;
+#endif
   if (err == 0) {
     return std::string(tmp_file_name);
   }
diff --git a/mkvmuxer/mkvmuxer.cc b/mkvmuxer/mkvmuxer.cc
index 137585d..41732fb 100644
--- a/mkvmuxer/mkvmuxer.cc
+++ b/mkvmuxer/mkvmuxer.cc
@@ -8,6 +8,8 @@
 
 #include "mkvmuxer/mkvmuxer.h"
 
+#include <stdint.h>
+
 #include <cfloat>
 #include <climits>
 #include <cstdio>