diff --git a/pkgs/os-specific/linux/qemu-kvm/default.nix b/pkgs/os-specific/linux/qemu-kvm/default.nix index 9223b7af917c..a26ea540808f 100644 --- a/pkgs/os-specific/linux/qemu-kvm/default.nix +++ b/pkgs/os-specific/linux/qemu-kvm/default.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation rec { sha256 = "018vb5nmk2fsm143bs2bl2wirhasd4b10d7jchl32zik4inbk2p9"; }; + patches = [ ./fix-librt-check.patch ]; + postPatch = '' for i in $(find . -type f) do diff --git a/pkgs/os-specific/linux/qemu-kvm/fix-librt-check.patch b/pkgs/os-specific/linux/qemu-kvm/fix-librt-check.patch new file mode 100644 index 000000000000..e540e9958021 --- /dev/null +++ b/pkgs/os-specific/linux/qemu-kvm/fix-librt-check.patch @@ -0,0 +1,19 @@ +diff -Naur qemu-kvm-1.2.0-orig/configure qemu-kvm-1.2.0/configure +--- qemu-kvm-1.2.0-orig/configure 2012-09-06 04:31:27.000000000 -0400 ++++ qemu-kvm-1.2.0/configure 2013-02-15 11:04:45.923477251 -0500 +@@ -2682,13 +2682,14 @@ + cat > $TMPC < + #include +-int main(void) { return clock_gettime(CLOCK_REALTIME, NULL); } ++int main(void) { return timer_gettime(CLOCK_REALTIME, NULL); } + EOF + + if compile_prog "" "" ; then + : + elif compile_prog "" "-lrt" ; then + LIBS="-lrt $LIBS" ++ libs_qga="-lrt $libs_qga" + fi + + if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \