$NetBSD$

--- hotspot/src/os/bsd/vm/os_bsd.cpp.orig	2011-01-02 20:30:15 +0100
+++ hotspot/src/os/bsd/vm/os_bsd.cpp	2011-01-02 21:04:52 +0100
@@ -45,11 +45,14 @@
 # include <link.h>
 #endif
 
-#if defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
 # include <elf.h>
 # ifndef EM_AMD64
 #  define EM_AMD64 EM_X86_64
 # endif
+# ifndef EM_486
+#  define EM_486 EM_386
+# endif
 #endif
 
 #ifdef __APPLE__
@@ -2983,7 +2986,7 @@ OSReturn os::set_native_priority(Thread*
 #if defined(__OpenBSD__) || defined(__NetBSD__)
   // OpenBSD pthread_setprio starves low priority threads
   return OS_OK;
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
   int ret = pthread_setprio(thread->osthread()->pthread_id(), newpri);
 #elif defined(__APPLE__)
   struct sched_param sp;
@@ -3011,7 +3014,7 @@ OSReturn os::get_native_priority(const T
   }
 
   errno = 0;
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
   *priority_ptr = pthread_getprio(thread->osthread()->pthread_id());
 #elif defined(__APPLE__)
   int policy;
