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
This commit is contained in:
@@ -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>
|
||||
|
@@ -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 \
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user