--- /dev/null
+Adjust librt checks for glibc 2.17+:
+Since glibc 2.17 clock interface is in libc, but timer interface remains in librt;
+qemu needs both.
+--- xen-4.2.1/tools/qemu-xen-traditional/configure.orig 2013-01-12 20:42:53.970053672 +0100
++++ xen-4.2.1/tools/qemu-xen-traditional/configure 2013-01-12 21:44:40.249976425 +0100
+@@ -1097,7 +1097,7 @@
+ cat > $TMPC <<EOF
+ #include <signal.h>
+ #include <time.h>
+-int main(void) { clockid_t id; return clock_gettime(id, NULL); }
++int main(void) { clockid_t id; timer_t tid; (void)timer_gettime(tid, NULL); return clock_gettime(id, NULL); }
+ EOF
+
+ rt=no
+--- xen-4.2.1/tools/qemu-xen/configure.orig 2013-01-12 20:42:53.986720338 +0100
++++ xen-4.2.1/tools/qemu-xen/configure 2013-01-12 21:44:39.856643097 +0100
+@@ -2463,7 +2463,7 @@
+ cat > $TMPC <<EOF
+ #include <signal.h>
+ #include <time.h>
+-int main(void) { clockid_t id; return clock_gettime(id, NULL); }
++int main(void) { clockid_t id; timer_t tid; (void)timer_gettime(tid, NULL); return clock_gettime(id, NULL); }
+ EOF
+
+ if compile_prog "" "" ; then
Patch3: pygrubfix.patch
Patch4: xend.catchbt.patch
Patch5: xend-pci-loop.patch
-Patch6: xen-dumpdir.patch
+Patch6: %{name}-dumpdir.patch
# Warning: this disables ingress filtering implemented in xen scripts!
-Patch7: xen-net-disable-iptables-on-bridge.patch
-Patch8: xen-configure-xend.patch
-Patch9: xen-initscript.patch
-Patch10: xen-quemu-softloat-c99.patch
-Patch11: xen-qemu.patch
-Patch12: xen-scripts-locking.patch
-Patch13: xen-close_lockfd_after_lock_attempt.patch
+Patch7: %{name}-net-disable-iptables-on-bridge.patch
+Patch8: %{name}-configure-xend.patch
+Patch9: %{name}-initscript.patch
+Patch10: %{name}-quemu-softloat-c99.patch
+Patch11: %{name}-qemu.patch
+Patch12: %{name}-scripts-locking.patch
+Patch13: %{name}-close_lockfd_after_lock_attempt.patch
+Patch14: %{name}-librt.patch
URL: http://www.xen.org/products/xenhyp.html
%{?with_opengl:BuildRequires: OpenGL-devel}
%{?with_sdl:BuildRequires: SDL-devel >= 1.2.1}
%patch11 -p1
%patch12 -p1
%patch13 -p1
+%patch14 -p1
# stubdom sources
ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom