[libgtop] Fix build issues on FreeBSD



commit a39f2906839b721f74445a7cafb1387e35280c5b
Author: Ting-Wei Lan <lantw44 gmail com>
Date:   Wed Feb 12 09:00:44 2014 -0500

    Fix build issues on FreeBSD

 libgtop-sysdeps.m4     |    5 ++++-
 sysdeps/freebsd/open.c |    4 ----
 2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/libgtop-sysdeps.m4 b/libgtop-sysdeps.m4
index 5d84430..34d53ba 100644
--- a/libgtop-sysdeps.m4
+++ b/libgtop-sysdeps.m4
@@ -174,7 +174,10 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
 
          AC_SUBST(EXTRA_SYSDEPS_LIBS)
 
-         AC_CHECK_HEADERS(net/if_var.h)
+         AC_CHECK_HEADERS(net/if_var.h,,, [
+#include <net/if.h>
+#include <sys/types.h>
+#include <sys/socket.h>])
          AC_MSG_CHECKING([for I4B])
          AC_TRY_COMPILE([
 #include <sys/types.h>
diff --git a/sysdeps/freebsd/open.c b/sysdeps/freebsd/open.c
index 39a768d..f976d0f 100644
--- a/sysdeps/freebsd/open.c
+++ b/sysdeps/freebsd/open.c
@@ -43,10 +43,6 @@ glibtop_open_s (glibtop *server, const char *program_name,
        server->real_ncpu = ncpus - 1;
        server->ncpu = MIN(GLIBTOP_NCPU - 1, server->real_ncpu);
 
-#if defined(__FreeBSD_kernel__)
-       server->os_version_code = __FreeBSD_kernel_version;
-#else
        server->os_version_code = __FreeBSD_version;
-#endif
 
 }


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