Applied DragonFly BSD patch https://raw.githubusercontent.com/DragonFlyBSD/DeltaPorts/master/ports/devel/sdl20/dragonfly/patch-include_SDL__endian.h
diff --git a/include/SDL_endian.h b/include/SDL_endian.h
index 11ea6c6..c3f8431 100644
--- a/include/SDL_endian.h
+++ b/include/SDL_endian.h
@@ -59,7 +59,7 @@ _m_prefetch(void *__P)
#ifdef __linux__
#include <endian.h>
#define SDL_BYTEORDER __BYTE_ORDER
-#elif defined(__OpenBSD__)
+#elif defined(__OpenBSD__) || defined(__DragonFly__)
#include <endian.h>
#define SDL_BYTEORDER BYTE_ORDER
#elif defined(__FreeBSD__) || defined(__NetBSD__)