From 2e861977a66bf095d310e90534618134415de197 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Wed, 12 Feb 2014 09:00:52 -0500 Subject: [PATCH] freebsd: don't link to libgeom libgeom declares several symbols in GLib's namespace, including g_close() and it therefore cannot be used from any program that also uses GLib. For now, disable the parts of the FreeBSD sysdep that use libgeom. Hopefully the libgeom API will be changed soon. https://bugzilla.gnome.org/show_bug.cgi?id=723685 --- libgtop-sysdeps.m4 | 14 -------------- sysdeps/freebsd/Makefile.am | 2 +- sysdeps/freebsd/fsusage.c | 6 +++--- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/libgtop-sysdeps.m4 b/libgtop-sysdeps.m4 index 34d53ba2..1ee8e2f2 100644 --- a/libgtop-sysdeps.m4 +++ b/libgtop-sysdeps.m4 @@ -160,20 +160,6 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[ AC_CHECK_LIB(kvm, kvm_open, KVM_LIBS=-lkvm, KVM_LIBS=) AC_SUBST(KVM_LIBS) - case "$host_os" in - kfreebsd*) - EXTRA_SYSDEPS_LIBS="-lgeom -ldevstat" - ;; - freebsd*) - osreldate=`sysctl -n kern.osreldate 2>/dev/null` - if test -n "${osreldate}" && test ${osreldate} -ge 600000 ; then - EXTRA_SYSDEPS_LIBS="-lgeom -ldevstat" - fi - ;; - esac - - AC_SUBST(EXTRA_SYSDEPS_LIBS) - AC_CHECK_HEADERS(net/if_var.h,,, [ #include #include diff --git a/sysdeps/freebsd/Makefile.am b/sysdeps/freebsd/Makefile.am index ee3df906..a1758531 100644 --- a/sysdeps/freebsd/Makefile.am +++ b/sysdeps/freebsd/Makefile.am @@ -11,7 +11,7 @@ libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c sysinfo.c shm_limits.c \ libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO) -libgtop_sysdeps_suid_2_0_la_LIBADD = $(KVM_LIBS) $(EXTRA_SYSDEPS_LIBS) +libgtop_sysdeps_suid_2_0_la_LIBADD = $(KVM_LIBS) libgtop_sysdeps_suid_2_0_la_SOURCES = suid_open.c close.c swap.c \ proclist.c procstate.c procuid.c \ proctime.c procmem.c procsignal.c \ diff --git a/sysdeps/freebsd/fsusage.c b/sysdeps/freebsd/fsusage.c index 375263b9..88b9b391 100644 --- a/sysdeps/freebsd/fsusage.c +++ b/sysdeps/freebsd/fsusage.c @@ -11,7 +11,7 @@ #include #include #include -#if __FreeBSD_version >= 600000 || defined(__FreeBSD_kernel__) +#if 0 #include #include #include @@ -32,7 +32,7 @@ _glibtop_get_fsusage_read_write (glibtop *server, glibtop_fsusage *buf, const ch { int result; struct statfs sfs; -#if __FreeBSD_version >= 600000 || defined(__FreeBSD_kernel__) +#if 0 struct devstat *ds; void *sc; struct timespec ts; @@ -49,7 +49,7 @@ _glibtop_get_fsusage_read_write (glibtop *server, glibtop_fsusage *buf, const ch glibtop_warn_io_r (server, "statfs"); return; } -#if __FreeBSD_version >= 600000 || defined(__FreeBSD_kernel__) +#if 0 ld[0] = 0; ld[1] = 0; result = geom_gettree (&gmp);