$NetBSD: patch-ab,v 1.5 2005/05/31 19:15:11 jmmv Exp $

--- loader/win32.c.orig	2005-04-15 22:17:12.000000000 +0200
+++ loader/win32.c
@@ -451,8 +451,10 @@ static int my_release(void* memory)
 
     if (last_alloc)
 	pthread_mutex_unlock(&memmut);
-    else
+    else {
+	pthread_mutex_unlock(&memmut);
 	pthread_mutex_destroy(&memmut);
+    }
 
     //if (alccnt < 40000) printf("MY_RELEASE: %p\t%ld    (%d)\n", header, header->size, alccnt);
 #else
@@ -993,7 +995,7 @@
 
 /* disable cpuid based detection (mplayer's cpudetect.c does this - see above) */
 #ifndef MPLAYER
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__svr4__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__svr4__) || defined(__DragonFly__)
     do_cpuid(1, regs);
     switch ((regs[0] >> 8) & 0xf) {			// cpu family
     case 3: cachedsi.dwProcessorType = PROCESSOR_INTEL_386;
