From 5be19e54defca8b4f47b39ebf0d521b382df5057 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= <pullmoll@t-online.de>
Date: Sun, 30 Aug 2015 09:30:32 +0200
Subject: [PATCH] xonotic: unbreak musl

---
 srcpkgs/xonotic/patches/musl-moncontrol.patch | 13 +++++++++++++
 srcpkgs/xonotic/template                      |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/xonotic/patches/musl-moncontrol.patch

diff --git a/srcpkgs/xonotic/patches/musl-moncontrol.patch b/srcpkgs/xonotic/patches/musl-moncontrol.patch
new file mode 100644
index 00000000000..68deabfecef
--- /dev/null
+++ b/srcpkgs/xonotic/patches/musl-moncontrol.patch
@@ -0,0 +1,13 @@
+There is no moncontrol() in musl libc.
+
+--- source/darkplaces/sys_shared.c	2015-01-13 19:56:16.000000000 +0100
++++ source/darkplaces/sys_shared.c	2015-08-30 09:24:54.839064473 +0200
+@@ -69,7 +69,7 @@
+ 	else
+ 		moncleanup();
+ #endif
+-#elif defined(__linux__) || defined(__FreeBSD__)
++#elif (defined(__linux__) && defined(__GLIBC__)) || defined(__FreeBSD__)
+ 	extern int moncontrol(int);
+ 	moncontrol(enable);
+ #endif
diff --git a/srcpkgs/xonotic/template b/srcpkgs/xonotic/template
index 1a6134cc91b..59a739eab32 100644
--- a/srcpkgs/xonotic/template
+++ b/srcpkgs/xonotic/template
@@ -1,7 +1,7 @@
 # Template file for 'xonotic'
 pkgname=xonotic
 version=0.8.1
-revision=1
+revision=2
 wrksrc="Xonotic"
 homepage="http://xonotic.org"
 license="GPL-2, GPL-3"