Re: [RFC/RFT] calloutng

From: Davide Italiano <davide_at_freebsd.org>
Date: Sat, 15 Dec 2012 12:50:45 -0800
On Sat, Dec 15, 2012 at 12:34 PM, Mark Johnston <markjdb_at_gmail.com> wrote:
> On Sat, Dec 15, 2012 at 06:55:53PM +0200, Alexander Motin wrote:
>> Hi.
>>
>> I'm sorry to interrupt review, but as usual good ideas came during the
>> final testing, causing another round. :)  Here is updated patch for
>> HEAD, that includes several new changes:
>> http://people.freebsd.org/~mav/calloutng_12_15.patch
>
> This patch breaks the libprocstat build.
>
> Specifically, the OpenSolaris sys/time.h defines the preprocessor
> symbols gethrestime and gethrestime_sec. These symbols are also defined
> in cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h.
> libprocstat:zfs.c is compiled using include paths that pick up the
> OpenSolaris time.h, and with this patch _callout.h includes sys/time.h.
>
> zfs.c includes taskqueue.h (with _KERNEL defined), which includes
> _callout.h, so both time.h and zfs_context.h are included in zfs.c, and
> the symbols are thus defined twice.
>
> The patch below fixes the build for me. Another approach might be to
> include sys/_task.h instead of taskqueue.h at the beginning of zfs.c.
>
> Thanks,
> -Mark
>
> diff --git a/lib/libprocstat/zfs.c b/lib/libprocstat/zfs.c
> index aa6d78e..f8844bf 100644
> --- a/lib/libprocstat/zfs.c
> +++ b/lib/libprocstat/zfs.c
> _at__at_ -35,6 +35,7 _at__at_
>
>  #undef lbolt
>  #undef lbolt64
> +#undef gethrestime
>  #undef gethrestime_sec
>  #include <sys/zfs_context.h>
>  #include <sys/spa.h>

I fixed (or at least workarounded) that issue during the summer.
http://svnweb.freebsd.org/base?view=revision&revision=237068
Probably that was lost somewhere. We're going to regenerate a patch,
but for now I suggest to patch that manually or to checkout the
calloutng project repository.
Received on Sat Dec 15 2012 - 19:50:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:33 UTC