--- a/src/runtime/x86-arch.c
+++ b/src/runtime/x86-arch.c
@@ -66,7 +66,7 @@
      * we need to do this nasty absolute index magic number thing
      * instead. */
     return &context->uc_mcontext.gregs[16];
-#elif defined __FreeBSD__
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
     return &context->uc_mcontext.mc_eflags;
 #elif defined __OpenBSD__
     return &context->sc_eflags;