From 0c9039c9d569bf91fc3fe3242d50ed8eafc4f746 Mon Sep 17 00:00:00 2001
From: Melroy van den Berg <melroy@melroy.org>
Date: Mon, 6 Dec 2021 21:12:49 +0100
Subject: [PATCH] Fix static build

Do *not* include the `DllMain` entry point in the static build, only when it's a shared build.
---
 src/dispatch_wgl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/dispatch_wgl.c b/src/dispatch_wgl.c
index 7baf1305..79a1da50 100644
--- a/src/dispatch_wgl.c
+++ b/src/dispatch_wgl.c
@@ -89,6 +89,7 @@ epoxy_handle_external_wglMakeCurrent(void)
     }
 }
 
+#ifdef DLL_EXPORT
 /**
  * This global symbol is apparently looked up by Windows when loading
  * a DLL, but it doesn't declare the prototype.
@@ -140,6 +141,7 @@ DllMain(HINSTANCE dll, DWORD reason, LPVOID reserved)
 
     return TRUE;
 }
+#endif
 
 WRAPPER_VISIBILITY (BOOL)
 WRAPPER(epoxy_wglMakeCurrent)(HDC hdc, HGLRC hglrc)