diff options
Diffstat (limited to 'src/video_out')
-rw-r--r-- | src/video_out/video_out_opengl.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index a82bb8f18..46fffabf8 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -694,10 +694,9 @@ static void *getdladdr (const GLubyte *_funcName) { return NULL; #elif defined(__APPLE__) - char *temp = xine_xmalloc (strlen (funcName) + 2); + char *temp; + asprintf(&temp, "_%s", funcName); void *res = NULL; - temp[0] = '_'; /* Mac OS X prepends an underscore on function names */ - strcpy (temp+1, funcName); if (NSIsSymbolNameDefined (temp)) { NSSymbol symbol = NSLookupAndBindSymbol (temp); res = NSAddressOfSymbol (symbol); |