From 3aa7a0dafe24faba4af8f70a257f74f07162e277 Mon Sep 17 00:00:00 2001 From: "kenton@google.com" Date: Mon, 17 Aug 2009 20:34:29 +0000 Subject: HPUX patch from Alexander Melnikov. --- src/google/protobuf/testing/googletest.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/google/protobuf/testing') diff --git a/src/google/protobuf/testing/googletest.cc b/src/google/protobuf/testing/googletest.cc index 1339b332..cd094d0c 100644 --- a/src/google/protobuf/testing/googletest.cc +++ b/src/google/protobuf/testing/googletest.cc @@ -46,6 +46,8 @@ #endif #include #include +#include +#include namespace google { namespace protobuf { @@ -94,7 +96,8 @@ string GetTemporaryDirectoryName() { // tmpnam() is generally not considered safe but we're only using it for // testing. We cannot use tmpfile() or mkstemp() since we're creating a // directory. - string result = tmpnam(NULL); + char b[L_tmpnam + 1]; // HPUX multithread return 0 if s is 0 + string result = tmpnam(b); #ifdef _WIN32 // On Win32, tmpnam() returns a file prefixed with '\', but which is supposed // to be used in the current working directory. WTF? -- cgit v1.2.3