qemu-kvm: Fix check for librt

This commit is contained in:
Shea Levy 2013-02-15 11:07:27 -05:00
parent a25b27a7f8
commit 8d245dc3d9
2 changed files with 21 additions and 0 deletions

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
sha256 = "018vb5nmk2fsm143bs2bl2wirhasd4b10d7jchl32zik4inbk2p9";
};
patches = [ ./fix-librt-check.patch ];
postPatch =
'' for i in $(find . -type f)
do

View File

@ -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 <<EOF
#include <signal.h>
#include <time.h>
-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 \