[libgtop] freebsd: don't link to libgeom



commit 2e861977a66bf095d310e90534618134415de197
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed Feb 12 09:00:52 2014 -0500

    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 34d53ba..1ee8e2f 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 <net/if.h>
 #include <sys/types.h>
diff --git a/sysdeps/freebsd/Makefile.am b/sysdeps/freebsd/Makefile.am
index ee3df90..a175853 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 375263b..88b9b39 100644
--- a/sysdeps/freebsd/fsusage.c
+++ b/sysdeps/freebsd/fsusage.c
@@ -11,7 +11,7 @@
 #include <sys/param.h>
 #include <sys/mount.h>
 #include <sys/statvfs.h>
-#if __FreeBSD_version >= 600000 || defined(__FreeBSD_kernel__)
+#if 0
 #include <libgeom.h>
 #include <sys/resource.h>
 #include <devstat.h>
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]