summaryrefslogtreecommitdiff
path: root/thirdparty/glad
diff options
context:
space:
mode:
authorAdrien Destugues <pulkomandy@pulkomandy.tk>2018-08-11 13:05:48 +0200
committerAdrien Destugues <pulkomandy@pulkomandy.tk>2018-08-11 17:20:51 +0200
commita294a842cb85f86cdd69b6e902aef01c9721668b (patch)
tree9c0053accdd4780931323f29f8413f91f6060aac /thirdparty/glad
parent0fc1c4eda8acd97af36228ed1d947bb5cdb2634a (diff)
Rebase patches for fixing haiku build.
Diffstat (limited to 'thirdparty/glad')
-rw-r--r--thirdparty/glad/glad.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/thirdparty/glad/glad.c b/thirdparty/glad/glad.c
index dd6fe8b8f3..35469e9031 100644
--- a/thirdparty/glad/glad.c
+++ b/thirdparty/glad/glad.c
@@ -77,7 +77,7 @@ void close_gl(void) {
#include <dlfcn.h>
static void* libGL;
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__HAIKU__)
typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*);
static PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
#endif
@@ -100,7 +100,7 @@ int open_gl(void) {
libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL);
if(libGL != NULL) {
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__HAIKU__)
return 1;
#else
gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL,
@@ -127,7 +127,7 @@ void* get_proc(const char *namez) {
void* result = NULL;
if(libGL == NULL) return NULL;
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__HAIKU__)
if(gladGetProcAddressPtr != NULL) {
result = gladGetProcAddressPtr(namez);
}