devel/libgtop2 cannot build

Conrad J. Sabatier conrads at cox.net
Tue Nov 16 11:15:04 PST 2004


On Fri, 12 Nov 2004 13:33:05 +0900, Norikatsu Shigemura
<nork at freebsd.org> wrote:

> Hi gnome maintainers!
> 
> 	I compiled devel/libtop2 on 6-current.  But it couldn't.
> 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> -
>  cc -DHAVE_CONFIG_H -I. -I. -I../.. -D_IN_LIBGTOP -D_GNU_SOURCE
>  -DGLIBTOP_NAMES -I../.. -I../.. -I../../sysdeps/freebsd
>  -I../../include -I/usr/local/include/glib-2.0
>  -I/usr/local/lib/glib-2.0/include -Winline -Wall -std=gnu89
>  -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes
>  -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare
>  -fno-strict-aliasing -O2 -fno-ident -pipe -march=pentium3
>  -I/usr/X11R6/include -DGTOPLOCALEDIR=\"/usr/X11R6/share/locale\"
>  -DLIBGTOP_VERSION=\"2.8.1\" -DLIBGTOP_SERVER_VERSION=\"5\"
>  -DLIBGTOP_VERSION_CODE=2008001
>  -DLIBGTOP_SERVER=\"/usr/X11R6/bin/libgtop_server2\"
>  -I/usr/local/include -Winline -Wall -std=gnu89 -Wchar-subscripts
>  -Wmissing-declarations -Wmissing-prototypes -Wnested-externs
>  -Wpointer-arith -Wcast-align -Wsign-compare -fno-strict-aliasing -O2
>  -fno-ident -pipe -march=pentium3 -c procmap.c  -fPIC -DPIC -o
>  .libs/procmap.o
> procmap.c: In function `glibtop_get_proc_map_p':
> procmap.c:276: error: structure has no member named `v_cachedfs'
> gmake[3]: *** [procmap.lo] Error 1
> gmake[3]: Leaving directory
> `/usr/ports/devel/libgtop2/work/libgtop-2.8.1/sysdeps/freebsd'- - - -
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> 
> 	According to src/sys/sys/vnode.h 1.254, v_cachedfs member was
> 	removed.  Anyone, do you have any idea?
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - revision 1.254
> date: 2004/11/09 22:51:03;  author: phk;  state: Exp;  lines: +0 -1
> Remove vnode->v_cachedfs.
> 
> It was only used for the highly dangerous "export all vnodes with a
> sysctl" function.
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> -_______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to
> "freebsd-hackers-unsubscribe at freebsd.org"
> 

The attached patch, applied under
/usr/ports/devel/libgtop2/work/libgtop-2.8.1/sysdeps/freebsd,
works for me under CURRENT.

-- 
Conrad J. Sabatier <conrads at cox.net> -- "In Unix veritas"
-------------- next part --------------
--- procmap.c.orig	Tue Nov 16 13:05:31 2004
+++ procmap.c	Tue Nov 16 13:11:13 2004
@@ -272,8 +272,10 @@
 #if defined(__FreeBSD__) && (__FreeBSD_version >= 500039)
                switch (vnode.v_type) {
                    case VREG:
+#if (__FreeBSD_version < 600006)
                        maps [i-1].inode = vnode.v_cachedid;
                        maps [i-1].device = vnode.v_cachedfs;
+#endif
                    default:
                    continue;
                }


More information about the freebsd-hackers mailing list