Hi:
Here's the diffs required to get the trunk
compiling against QNX 6.4.1 (configure diffs
omitted since I figure you can generate them
as well but I can send them on request).
Regards,
-seanb
Index: net-snmp/configure.d/config_os_libs
===================================================================
--- net-snmp/configure.d/config_os_libs (revision 17733)
+++ net-snmp/configure.d/config_os_libs (working copy)
@@ -64,7 +64,10 @@
AC_SEARCH_LIBS(gethostbyname, [nsl socket])
AC_CHECK_FUNCS(gethostbyname)
+AC_SEARCH_LIBS(getfsstat, [nbutil])
+AC_CHECK_FUNCS(getfsstat)
+
# kstat library (Solaris)
#
NETSNMP_SEARCH_LIBS(kstat_lookup, kstat,
Index: net-snmp/configure.d/config_os_struct_members
===================================================================
--- net-snmp/configure.d/config_os_struct_members (revision 17733)
+++ net-snmp/configure.d/config_os_struct_members (working copy)
@@ -171,6 +171,7 @@
AC_CHECK_MEMBERS([struct statfs.f_favail,
struct statfs.f_ffree,
struct statfs.f_files,
+ struct statfs.f_flags,
struct statfs.f_frsize],,,[
AC_INCLUDES_DEFAULT()
[
@@ -183,6 +184,9 @@
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
+#ifdef HAVE_NBUTIL_H
+#include <nbutil.h>
+#endif
]])
# struct statvfs
Index: net-snmp/configure.d/config_os_functions
===================================================================
--- net-snmp/configure.d/config_os_functions (revision 17733)
+++ net-snmp/configure.d/config_os_functions (working copy)
@@ -36,7 +36,7 @@
# Agent:
AC_CHECK_FUNCS([cgetnext execv gai_strerror ] dnl
- [getfsstat getgrnam gethostname ] dnl
+ [ getgrnam gethostname ] dnl
[ getloadavg ] dnl
[getpid getpwnam getvfsstat ] dnl
[hasmntopt initgroups ] dnl
Index: net-snmp/configure.d/config_os_headers
===================================================================
--- net-snmp/configure.d/config_os_headers (revision 17733)
+++ net-snmp/configure.d/config_os_headers (working copy)
@@ -195,6 +195,9 @@
#endif
]])
+# QNX
+AC_CHECK_HEADERS([nbutil.h])
+
# UFS headers
# Agent:
#
Index: net-snmp/apps/snmpnetstat/inet6.c
===================================================================
--- net-snmp/apps/snmpnetstat/inet6.c (revision 17733)
+++ net-snmp/apps/snmpnetstat/inet6.c (working copy)
@@ -493,7 +493,7 @@
if (IN6_IS_ADDR_LINKLOCAL(in6p) ||
IN6_IS_ADDR_MC_LINKLOCAL(in6p)) {
sin6.sin6_scope_id =
- ntohs(*(u_int16_t *)&in6p->s6_addr[2]);
+ ntohs(*(uint16_t *)&in6p->s6_addr[2]);
sin6.sin6_addr.s6_addr[2] = 0;
sin6.sin6_addr.s6_addr[3] = 0;
}
Index: net-snmp/include/net-snmp/system/nto-qnx6.h
===================================================================
--- net-snmp/include/net-snmp/system/nto-qnx6.h (revision 0)
+++ net-snmp/include/net-snmp/system/nto-qnx6.h (revision 0)
@@ -0,0 +1,35 @@
+#include "bsd.h"
+
+#include <sys/param.h>
+
+#define PCB_TABLE 1
+#undef TCP_SYMBOL
+#define TCP_SYMBOL "tcbtable"
+#undef TCP_TTL_SYMBOL
+#define TCP_TTL_SYMBOL "ip_defttl"
+#undef UDB_SYMBOL
+#define UDB_SYMBOL "udbtable"
+#undef NPROC_SYMBOL
+#undef PROC_SYMBOL
+
+#define MBPOOL_SYMBOL "mbpool"
+#define MCLPOOL_SYMBOL "mclpool"
+
+/*
+ * inp_next symbol
+ */
+#undef INP_NEXT_SYMBOL
+#define INP_NEXT_SYMBOL inp_queue.cqe_next
+#undef INP_PREV_SYMBOL
+#define INP_PREV_SYMBOL inp_queue.cqe_prev
+#define HAVE_INPCBTABLE 1
+
+#undef IFADDR_SYMBOL
+#define IFADDR_SYMBOL "in_ifaddrhead"
+
+#define UTMP_FILE _PATH_UTMP
+
+#define UDP_ADDRESSES_IN_HOST_ORDER 1
+
+/* define the extra mib modules that are supported */
+//#define NETSNMP_INCLUDE_HOST_RESOURCES
Index: net-snmp/include/net-snmp/net-snmp-config.h.in
===================================================================
--- net-snmp/include/net-snmp/net-snmp-config.h.in (revision 17733)
+++ net-snmp/include/net-snmp/net-snmp-config.h.in (working copy)
@@ -829,6 +829,9 @@
/* Define to 1 if `f_files' is member of `struct statfs'. */
#undef HAVE_STRUCT_STATFS_F_FILES
+/* Define to 1 if `f_flags' is member of `struct statfs'. */
+#undef HAVE_STRUCT_STATFS_F_FLAGS
+
/* Define to 1 if `f_frsize' is member of `struct statfs'. */
#undef HAVE_STRUCT_STATFS_F_FRSIZE
@@ -890,6 +893,9 @@
/* Define to 1 if you have the <sys/disklabel.h> header file. */
#undef HAVE_SYS_DISKLABEL_H
+/* Define to 1 if you have the <nbutil.h> header file. */
+#undef HAVE_NBUTIL_H
+
/* Define to 1 if you have the <sys/dkio.h> header file. */
#undef HAVE_SYS_DKIO_H
Index: net-snmp/agent/mibgroup/host/hr_filesys.c
===================================================================
--- net-snmp/agent/mibgroup/host/hr_filesys.c (revision 17733)
+++ net-snmp/agent/mibgroup/host/hr_filesys.c (working copy)
@@ -53,6 +53,10 @@
#include <stdlib.h>
#endif
+#if HAVE_NBUTIL_H
+#include <nbutil.h>
+#endif
+
#if defined(aix4) || defined(aix5) || defined(aix6)
#include <sys/mntctl.h>
#include <sys/vmount.h>
@@ -114,6 +118,16 @@
#define HRFS_name f_mntfromname
#define HRFS_statfs statvfs
#define HRFS_type f_fstypename
+#elif defined(HAVE_GETFSSTAT) && !defined(HAVE_STATFS) && defined(HAVE_STATVFS)
+
+static struct statfs *fsstats = NULL;
+struct statfs *HRFS_entry;
+static int fscount;
+#define HRFS_mount f_mntonname
+#define HRFS_name f_mntfromname
+#define HRFS_statfs statvfs
+#define HRFS_type f_fstypename
+
#elif defined(HAVE_GETFSSTAT)
static struct statfs *fsstats = 0;
static int fscount;
@@ -542,7 +556,11 @@
#if defined(HAVE_STATVFS) && defined(__NetBSD__)
long_return = HRFS_entry->f_flag & MNT_RDONLY ? 2 : 1;
#elif defined(HAVE_GETFSSTAT)
+#if HAVE_STRUCT_STATFS_F_FLAGS
long_return = HRFS_entry->f_flags & MNT_RDONLY ? 2 : 1;
+#else
+ long_return = HRFS_entry->f_flag & MNT_RDONLY ? 2 : 1;
+#endif
#elif defined(cygwin)
long_return = 1;
#elif defined(aix4) || defined(aix5) || defined(aix6)
Index: net-snmp/agent/mibgroup/host/hr_storage.c
===================================================================
--- net-snmp/agent/mibgroup/host/hr_storage.c (revision 17733)
+++ net-snmp/agent/mibgroup/host/hr_storage.c (working copy)
@@ -160,6 +160,9 @@
#else
#include <strings.h>
#endif
+#if HAVE_NBUTIL_H
+#include <nbutil.h>
+#endif
#include <net-snmp/utilities.h>
#include <net-snmp/output_api.h>
@@ -215,6 +218,14 @@
#define HRFS_mount mnt_dir
#define HRFS_HAS_FRSIZE HAVE_STRUCT_STATVFS_F_FRSIZE
+#elif defined(HAVE_GETFSSTAT) && !defined(HAVE_STATFS) && defined(HAVE_STATVFS)
+
+extern struct statfs *HRFS_entry;
+extern int fscount;
+#define HRFS_statfs statvfs
+#define HRFS_mount f_mntonname
+#define HRFS_HAS_FRSIZE STRUCT_STATVFS_HAS_F_FRSIZE
+
#elif defined(HAVE_GETFSSTAT)
extern struct statfs *HRFS_entry;
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders