diff -u hikari/completion.c hikari.dfly/completion.c
--- hikari/completion.c	2019-03-30 06:08:55.000000000 +1000
+++ hikari.dfly/completion.c	2019-03-31 16:49:05.000360000 +1000
@@ -3,6 +3,9 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
+#ifdef __DragonFly__
+#include <sys/queue.h>
+#endif
 
 struct completion_t *
 completion_create(char *item)
@@ -25,7 +28,11 @@
 
   struct completion_item_t *item, *item_temp;
 
+#ifdef __DragonFly__
+  TAILQ_FOREACH_MUTABLE(item, &(completion->items), completion_items, item_temp) {
+#else
   TAILQ_FOREACH_SAFE(item, &(completion->items), completion_items, item_temp) {
+#endif
     TAILQ_REMOVE(&(completion->items), item, completion_items);
     free(item);
   }
diff -u hikari/group.c hikari.dfly/group.c
--- hikari/group.c	2019-03-30 06:08:55.000000000 +1000
+++ hikari.dfly/group.c	2019-03-31 16:53:16.214331000 +1000
@@ -1,6 +1,9 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
+#ifdef __DragonFly__
+#include <sys/queue.h>
+#endif
 
 #include "group.h"
 #include "indicator_frame.h"
@@ -99,12 +102,21 @@
 {
   struct window_t *window, *window_temp;
 
+#ifdef __DragonFly__
+  TAILQ_FOREACH_MUTABLE
+    ( window
+    , &(group->windows)
+    , group_windows
+    , window_temp
+    )
+#else
   TAILQ_FOREACH_SAFE
     ( window
     , &(group->windows)
     , group_windows
     , window_temp
     )
+#endif
   {
     TAILQ_REMOVE(&(group->windows), window, group_windows);
     window->group = NULL;
Only in hikari.dfly: hikari
diff -u hikari/sheet.c hikari.dfly/sheet.c
--- hikari/sheet.c	2019-03-30 06:08:55.000000000 +1000
+++ hikari.dfly/sheet.c	2019-03-31 16:54:42.575696000 +1000
@@ -1,6 +1,9 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
+#ifdef __DragonFly__
+#include <sys/queue.h>
+#endif
 
 #include "group.h"
 #include "layout.h"
@@ -15,7 +18,11 @@
 {
   if (sheet->layout != NULL) {
     struct tile_t *tile, *tile_temp;
-    TAILQ_FOREACH_SAFE( tile
+#ifdef __DragonFly__
+  TAILQ_FOREACH_MUTABLE( tile
+#else
+  TAILQ_FOREACH_SAFE( tile
+#endif
                       , &(sheet->layout->windows)
                       , tiled_windows
                       , tile_temp
diff -u hikari/workspace.c hikari.dfly/workspace.c
--- hikari/workspace.c	2019-03-30 06:08:55.000000000 +1000
+++ hikari.dfly/workspace.c	2019-03-31 17:03:25.973838000 +1000
@@ -5,6 +5,10 @@
 #include <stdio.h>
 #endif
 
+#ifdef __DragonFly__
+#include <sys/queue.h>
+#endif
+
 #include "cursor.h"
 #include "group.h"
 #include "group_changer.h"
@@ -808,8 +812,13 @@
 
   CANCEL_INDICATION();
   HIKARI_WORKSPACE_UNSET_SELECTING();
-  TAILQ_FOREACH_REVERSE_SAFE
-    ( window
+
+#ifdef __DragonFly__
+  TAILQ_FOREACH_REVERSE_MUTABLE (
+#else
+  TAILQ_FOREACH_REVERSE_SAFE (
+#endif
+     window
     , &(workspace.windows)
     , workspace_windows_t
     , workspace_windows
@@ -1169,7 +1178,12 @@
   FOCUS_GUARD();
 
   struct window_t *window, *window_temp;
+
+#ifdef __DragonFly__
+  TAILQ_FOREACH_MUTABLE( window
+#else
   TAILQ_FOREACH_SAFE( window
+#endif
                     , &(workspace.windows)
                     , workspace_windows
                     , window_temp
@@ -1187,7 +1201,11 @@
   FOCUS_GUARD();
 
   struct window_t *window, *window_temp;
+#ifdef __DragonFly__
+  TAILQ_FOREACH_MUTABLE( window
+#else
   TAILQ_FOREACH_SAFE( window
+#endif
                     , &(workspace.windows)
                     , workspace_windows
                     , window_temp
@@ -1205,7 +1223,11 @@
   FOCUS_GUARD();
 
   struct window_t *window, *window_temp;
+#ifdef __DragonFly__
+  TAILQ_FOREACH_MUTABLE( window
+#else
   TAILQ_FOREACH_SAFE( window
+#endif
                     , &(workspace.windows)
                     , workspace_windows
                     , window_temp
@@ -1233,7 +1255,11 @@
   FOCUS_GUARD();
 
   struct window_t *window, *window_temp;
+#ifdef __DragonFly__
+  TAILQ_FOREACH_MUTABLE( window
+#else
   TAILQ_FOREACH_SAFE( window
+#endif
                     , &(workspace.windows)
                     , workspace_windows
                     , window_temp
@@ -1259,7 +1285,11 @@
   FOCUS_GUARD();
 
   struct window_t *window, *window_temp;
+#ifdef __DragonFly__
+  TAILQ_FOREACH_REVERSE_MUTABLE( window
+#else
   TAILQ_FOREACH_REVERSE_SAFE( window
+#endif
                             , &(workspace.windows)
                             , workspace_windows_t
                             , workspace_windows
@@ -1283,7 +1313,11 @@
   HIKARI_WORKSPACE_UNSET_SELECTING();
 
   struct window_t *window, *window_temp;
+#ifdef __DragonFly__
+  TAILQ_FOREACH_REVERSE_MUTABLE( window
+#else
   TAILQ_FOREACH_REVERSE_SAFE( window
+#endif
                             , &(workspace.windows)
                             , workspace_windows_t
                             , workspace_windows
