Date: Wed, 9 May 2001 18:03:20 -0600
authorSam Lantinga <slouken@lokigames.com>
Thu, 10 May 2001 20:31:51 +0000
changeset 26c447d5b9275d
parent 25 3fbf86244fd2
child 27 a7e598a8d8be
Date: Wed, 9 May 2001 18:03:20 -0600
From: Peter Valchev <pvalchev@openbsd.org>
Subject: openbsd patches

- The dlsym() one is supposed to fix dynamic loading on our a.out
architectures, where prefixing of an underscore symbol is required.
Actually I don't know what kind of dynamic loading does SDL deal with,
but anyway. You may want to make that change global, but only gcc's
preprocessor passes __ELF__, I think, so you can just add Linux or
something if you decide so.
src/video/x11/SDL_x11gl.c
     1.1 --- a/src/video/x11/SDL_x11gl.c	Thu May 10 20:29:31 2001 +0000
     1.2 +++ b/src/video/x11/SDL_x11gl.c	Thu May 10 20:31:51 2001 +0000
     1.3 @@ -343,6 +343,9 @@
     1.4  #endif
     1.5  	handle = dlopen(path, dlopen_flags);
     1.6  	/* Catch the case where the application isn't linked with GL */
     1.7 +#if defined __OpenBSD__ && !defined __ELF__
     1.8 +#define dlsym(x,y) dlsym(x, "_" y)
     1.9 +#endif
    1.10  	if ( (dlsym(handle, "glXChooseVisual") == NULL) && (path == NULL) ) {
    1.11  		dlclose(handle);
    1.12  		path = getenv("SDL_VIDEO_GL_DRIVER");