$OpenBSD: patch-libgphoto2_port_libgphoto2_port_gphoto2-port-portability_h,v 1.2 2003/04/20 20:51:20 sturm Exp $
--- libgphoto2_port/libgphoto2_port/gphoto2-port-portability.h.orig	Mon Apr  7 17:30:13 2003
+++ libgphoto2_port/libgphoto2_port/gphoto2-port-portability.h	Mon Apr  7 17:30:46 2003
@@ -60,8 +60,9 @@ typedef struct {
 
 /* Dynamic library functions */
 #define GP_SYSTEM_DLOPEN(_filename)		dlopen(_filename, RTLD_LAZY)
-#if defined(__APPLE__) || defined(__OpenBSD__)
+#if defined(__APPLE__) || (defined(__OpenBSD__) && !defined(__ELF__))
 	/* Darwin and OpenBSD prepend underscores to symbols */
+	/* The gphoto2 makers are as stupid as any other GNU software! -mirabile */
 #define GP_SYSTEM_DLSYM(_handle, _funcname)	dlsym(_handle, "_" _funcname)
 #else
 #define GP_SYSTEM_DLSYM(_handle, _funcname)	dlsym(_handle, _funcname)
