diff options
author | Rolan Reznik <rolan.reznik@icloud.com> | 2016-02-13 22:47:18 +0200 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2016-02-19 15:19:42 +0000 |
commit | 3ca4dff329f9ba12398d9c5e13c100599e50bff4 (patch) | |
tree | 5b2a216aa71933b2da0e7f19f697bbfbbb9a2e1a /dispatch | |
parent | 164e0e8980e9ed4662a711c19af708c027cf4831 (diff) |
gltrace: Fixed loading of OpenGL.framework in sandboxed environment.
Fixes #350.
Diffstat (limited to 'dispatch')
-rw-r--r-- | dispatch/glproc_gl.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dispatch/glproc_gl.cpp b/dispatch/glproc_gl.cpp index 8ae40d42..3d963fb1 100644 --- a/dispatch/glproc_gl.cpp +++ b/dispatch/glproc_gl.cpp @@ -26,6 +26,7 @@ #include "glproc.hpp" #include "os.hpp" +#include "os_string.hpp" #if !defined(_WIN32) @@ -100,7 +101,9 @@ void * _libgl_sym(const char *symbol) * instead. */ - char temp_filename[] = "/tmp/tmp.XXXXXX"; + os::String temp_template = os::getTemporaryDirectoryPath(); + temp_template.append("tmp.XXXXXX"); + char *temp_filename = temp_template.buf(temp_template.length() + 1); if (mktemp(temp_filename) != NULL) { if (symlink(libgl_filename, temp_filename) == 0) { |