Re: sysutils/lsof: VOP_FSYNC definition moved?

From: Yuri Pankov <yuripv_at_yuripv.net>
Date: Sat, 31 Aug 2019 06:20:27 +0300
Larry Rosenman wrote:
> http://home.lerctr.org:8888/data/live-host-ports/2019-08-30_20h25m06s/logs/errors/lsof-4.93.2_4,8.log
> 
> --- dnode2.o ---
> In file included from dnode2.c:56:
> In file included from 
> /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h:33:
> In file included from 
> /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h:47:
> In file included from 
> /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h:73:
> In file included from /usr/src/sys/cddl/compat/opensolaris/sys/vfs.h:37:
> /usr/src/sys/cddl/compat/opensolaris/sys/vnode.h:243:10: warning: 
> implicit declaration of function 'VOP_FSYNC' is invalid in C99 
> [-Wimplicit-function-declaration]
>          error = VOP_FSYNC(vp, MNT_WAIT, curthread);
>                  ^
> 1 warning generated.
> A failure has been detected in another branch of the parallel make

Real error seems to be way above that (see below), and VOP_FSYNC one is
just a fallout from that.  It is likely related to r351594 by
Konstantin, but I didn't look into the details.  You could try defining
_SYS_PCPU_H_ before including <sys/file.h>  in dlsof.h with _KERNEL
defined -- this seems to fix the lsof build for me.

-------------
In file included from ckkv.c:43:
In file included from ./../lsof.h:221:
In file included from ./../dlsof.h:412:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
In file included from /usr/src/sys/sys/systm.h:126:
In file included from /usr/src/sys/sys/pcpu.h:223:
/usr/include/machine/pcpu_aux.h:55:55: error: expected expression
        __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct pcpu,
                                                             ^
/usr/include/machine/pcpu_aux.h:56:6: error: use of undeclared
identifier 'pc_curthread'; did you mean '__curthread'?
            pc_curthread)));
            ^
/usr/include/machine/pcpu_aux.h:51:1: note: '__curthread' declared here
__curthread(void)
^
/usr/include/machine/pcpu_aux.h:66:56: error: expected expression
        __asm("movq %%gs:%P1,%0" : "=r" (pcb) : "n" (offsetof(struct pcpu,
                                                              ^
/usr/include/machine/pcpu_aux.h:67:6: error: use of undeclared
identifier 'pc_curpcb'; did you mean '__curpcb'?
            pc_curpcb)));
            ^
/usr/include/machine/pcpu_aux.h:62:1: note: '__curpcb' declared here
__curpcb(void)
Received on Sat Aug 31 2019 - 01:20:35 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:21 UTC