--- a/src/dlopen.cpp
+++ b/src/dlopen.cpp
@@ -13,6 +13,11 @@
 #include "od-win32/win32.h"
 #endif
 
+#ifndef RTLD_DEEPBIND
+// musl neither defines nor can use RTLD_DEEPBIND
+#define RTLD_DEEPBIND 0
+#endif
+
 UAE_DLHANDLE uae_dlopen(const TCHAR *path)
 {
 	UAE_DLHANDLE result;
