Add missing errno.h include statement and use int instead of errno_t.
authorAndreas Schuh <andreas.schuh.84@gmail.com>
Mon, 17 Mar 2014 21:38:21 +0000 (21:38 +0000)
committerAndreas Schuh <andreas.schuh.84@gmail.com>
Mon, 17 Mar 2014 21:38:21 +0000 (21:38 +0000)
src/util.h

index 0668fbc..9035890 100644 (file)
@@ -46,6 +46,7 @@
 #include <stdio.h>
 #include <iostream>
 #include <string>
+#include <errno.h>
 #ifdef GFLAGS_HAVE_SYS_STAT_H
 #  include <sys/stat.h> // for mkdir
 #endif
@@ -356,7 +357,7 @@ inline bool SafeGetEnv(const char *varname, std::string &valstr)
        return true;
 }
 
-inline errno_t SafeFOpen(FILE **fp, const char* fname, const char *mode)
+inline int SafeFOpen(FILE **fp, const char* fname, const char *mode)
 {
 #if defined(_MSC_VER) && _MSC_VER >= 1400
        return fopen_s(fp, fname, mode);