Applied DragonFly BSD patch https://github.com/DragonFlyBSD/DeltaPorts/blob/master/ports/devel/sdl20/dragonfly/patch-src_stdlib_SDL__malloc.c
diff --git a/src/stdlib/SDL_malloc.c b/src/stdlib/SDL_malloc.c
index 980120b..1e986f6 100644
--- a/src/stdlib/SDL_malloc.c
+++ b/src/stdlib/SDL_malloc.c
@@ -1249,7 +1249,7 @@ extern "C"
#ifndef LACKS_UNISTD_H
#include <unistd.h> /* for sbrk */
#else /* LACKS_UNISTD_H */
-#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
extern void *sbrk(ptrdiff_t);
#endif /* FreeBSD etc */
#endif /* LACKS_UNISTD_H */