From 488c1eb87b1b484da67ea0ccbb360bf1a6968003 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Sat, 25 Aug 2012 10:24:34 +0200
Subject: [PATCH] test/test_queue_priority: fix SIGABRT

---
 Makefile.am                |  1 -
 test/test_queue_priority.c | 15 +++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 1114964b7..08c3b5ce6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1351,7 +1351,6 @@ test_test_pcm_LDADD = \
 
 test_test_queue_priority_SOURCES = \
 	src/queue.c \
-	test/FakeSong.cxx \
 	test/test_queue_priority.c
 test_test_queue_priority_LDADD = \
 	$(GLIB_LIBS)
diff --git a/test/test_queue_priority.c b/test/test_queue_priority.c
index a7106a8e9..2fc1a3706 100644
--- a/test/test_queue_priority.c
+++ b/test/test_queue_priority.c
@@ -1,5 +1,20 @@
+#include "config.h"
 #include "queue.h"
 #include "song.h"
+#include "directory.h"
+
+struct directory detached_root;
+
+struct song *
+song_dup_detached(const struct song *src)
+{
+	union {
+		const struct song *in;
+		struct song *out;
+	} u = { .in = src };
+
+	return u.out;
+}
 
 void
 song_free(G_GNUC_UNUSED struct song *song)