about summary refs log tree commit diff stats
path: root/src/box64context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/box64context.c')
-rw-r--r--src/box64context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/box64context.c b/src/box64context.c
index 208a9fa2..33a0d10b 100644
--- a/src/box64context.c
+++ b/src/box64context.c
@@ -230,7 +230,9 @@ box64context_t *NewBox64Context(int argc)
     // create exit bridge
     context->exit_bridge = AddBridge(context->system, NULL, NULL, 0, NULL);
     // get handle to box64 itself
+    #ifndef STATICBUILD
     context->box64lib = dlopen(NULL, RTLD_NOW|RTLD_GLOBAL);
+    #endif
     context->dlprivate = NewDLPrivate();
 
     context->argc = argc;
@@ -341,8 +343,10 @@ void FreeBox64Context(box64context_t** context)
 
     FreeBridge(&ctx->system);
 
+    #ifndef STATICBUILD
     freeGLProcWrapper(ctx);
     freeALProcWrapper(ctx);
+    #endif
 
     if(ctx->stack_clone)
         box_free(ctx->stack_clone);