--- a/src/runtime/x86-bsd-os.h
+++ b/src/runtime/x86-bsd-os.h
@@ -17,7 +17,7 @@
  * store signal context information, but at least they tend to use the
  * same stems to name the structure fields, so by using this macro we
  * can share a fair amount of code between different variants. */
-#if defined __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 #define CONTEXT_ADDR_FROM_STEM(stem) &context->uc_mcontext.mc_ ## stem
 #elif defined(__OpenBSD__)
 #define CONTEXT_ADDR_FROM_STEM(stem) &context->sc_ ## stem
@@ -35,7 +35,7 @@
 void os_restore_fp_control(os_context_t *context);
 #endif
 
-#if defined LISP_FEATURE_OPENBSD
+#if defined(LISP_FEATURE_OPENBSD) || defined(LISP_FEATURE_DRAGONFLY)
 #define RESTORE_FP_CONTROL_FROM_CONTEXT
 void os_restore_fp_control(os_context_t *context);
 #endif