[libvirt] [PATCH] Don't link with -lrt on OpenBSD
Eric Blake
eblake at redhat.com
Tue Sep 4 15:26:05 UTC 2012
On 09/04/2012 09:04 AM, Jasper Lievisse Adriaanse wrote:
>>From bdf3bce37531ec346474bc5c4f37a5d2985d1d35 Mon Sep 17 00:00:00 2001
> From: Jasper Lievisse Adriaanse <jasper at humppa.nl>
> Date: Tue, 4 Sep 2012 17:03:43 +0200
> Subject: [PATCH] Don't link with -lrt on OpenBSD
>
> ---
> configure.ac | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index e0d00d5..54d049d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -188,7 +188,13 @@ RT_LIBS=
> LIBS="$LIBS $LIB_PTHREAD -lrt"
> AC_CHECK_FUNC([clock_gettime],[
> AC_DEFINE([HAVE_CLOCK_GETTIME],[],[Defined if clock_gettime() exists in librt.so])
> - RT_LIBS=-lrt
> + case "$host" in
> + *-*-openbsd*)
> + ;;
> + *)
> + RT_LIBS=-lrt
> + ;;
> + esac
I'd much rather write this as a probe to see if linking with -rt makes a
difference, and only add it when it matters, than trying to blindly add
it (the pre-patch version) or to blindly exclude it for some platforms
(the post-patch version). I also wonder if gnulib has some help on this
front. NACK to this version while I investigate.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120904/03eeea0a/attachment-0001.sig>
More information about the libvir-list
mailing list