net-snmp 5.x compile problem(and fix?) on AIX 6.1
Jeff Quaintance <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hi All, I ran into an issue yesterday with trying to compile either 5.4 or 5.5 source trees on AIX 6.1, I have successfully compiled both on AIX 5.3 after digging around i found an open bug(2814153 on bug tracker) for net-snmp 5.4.1 on AIX 6.1 with the same compile error and in the comment there was a link to another thread with coreutils having the same compile error. long story short, I followed the same recommendation that the coreutils developer(s) came back with and applied it to the net-snmp tree, basically wherever you are including libperfstat.h you must now also include protosw.h or you get a compile error(detailed in the bug# listed above) i built a patch and attached it here. i'd appreciate it if someone else with more knowledge than I could confirm that this is actually the right thing to do and if so, is there anyone else i need to contact about getting this fixed in the source tree? thanks in advance! ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
net-snmp-5.4.2.1-aix61.patch
(application/octet-stream, 6.2 KB)
diff -crB net-snmp-5.4.2.1/agent/mibgroup/hardware/cpu/cpu_perfstat.c net-snmp-5.4.2.1.patch/agent/mibgroup/hardware/cpu/cpu_perfstat.c *** net-snmp-5.4.2.1/agent/mibgroup/hardware/cpu/cpu_perfstat.c 2007-02-21 17:29:28.000000000 -0700 --- net-snmp-5.4.2.1.patch/agent/mibgroup/hardware/cpu/cpu_perfstat.c 2009-10-23 10:26:28.000000000 -0600 *************** *** 11,16 **** --- 11,17 ---- #include <unistd.h> #include <sys/types.h> + #include <sys/protosw.h> #include <libperfstat.h> void _cpu_copy_stats( netsnmp_cpu_info *cpu ); diff -crB net-snmp-5.4.2.1/agent/mibgroup/hardware/memory/memory_aix.c net-snmp-5.4.2.1.patch/agent/mibgroup/hardware/memory/memory_aix.c *** net-snmp-5.4.2.1/agent/mibgroup/hardware/memory/memory_aix.c 2006-03-06 09:23:52.000000000 -0700 --- net-snmp-5.4.2.1.patch/agent/mibgroup/hardware/memory/memory_aix.c 2009-10-23 10:26:18.000000000 -0600 *************** *** 4,9 **** --- 4,10 ---- #include <net-snmp/agent/hardware/memory.h> #include <unistd.h> + #include <sys/protosw.h> #include <libperfstat.h> #include <sys/stat.h> diff -crB net-snmp-5.4.2.1/agent/mibgroup/host/hr_storage.c net-snmp-5.4.2.1.patch/agent/mibgroup/host/hr_storage.c *** net-snmp-5.4.2.1/agent/mibgroup/host/hr_storage.c 2008-06-05 15:11:53.000000000 -0600 --- net-snmp-5.4.2.1.patch/agent/mibgroup/host/hr_storage.c 2009-10-23 10:24:10.000000000 -0600 *************** *** 113,118 **** --- 113,119 ---- #endif /* ifndef dynix */ #if (defined(aix4) || defined(aix5) || defined(aix6)) && HAVE_LIBPERFSTAT_H + #include <sys/protosw.h> #include <libperfstat.h> #endif diff -crB net-snmp-5.4.2.1/agent/mibgroup/mibII/icmp.c net-snmp-5.4.2.1.patch/agent/mibgroup/mibII/icmp.c *** net-snmp-5.4.2.1/agent/mibgroup/mibII/icmp.c 2008-06-05 15:11:53.000000000 -0600 --- net-snmp-5.4.2.1.patch/agent/mibgroup/mibII/icmp.c 2009-10-23 10:24:24.000000000 -0600 *************** *** 32,37 **** --- 32,38 ---- #endif #if defined(HAVE_LIBPERFSTAT_H) && (defined(aix4) || defined(aix5) || defined(aix6)) && !defined(FIRST_PROTOCOL) + #include <sys/protosw.h> #include <libperfstat.h> #ifdef FIRST_PROTOCOL perfstat_protocol_t ps_proto; diff -crB net-snmp-5.4.2.1/agent/mibgroup/mibII/ip.c net-snmp-5.4.2.1.patch/agent/mibgroup/mibII/ip.c *** net-snmp-5.4.2.1/agent/mibgroup/mibII/ip.c 2008-06-05 15:11:53.000000000 -0600 --- net-snmp-5.4.2.1.patch/agent/mibgroup/mibII/ip.c 2009-10-23 10:19:44.000000000 -0600 *************** *** 34,39 **** --- 34,40 ---- #endif #if defined(HAVE_LIBPERFSTAT_H) && (defined(aix4) || defined(aix5) || defined(aix6)) && !defined(FIRST_PROTOCOL) + #include <sys/protosw.h> #include <libperfstat.h> #ifdef FIRST_PROTOCOL perfstat_protocol_t ps_proto; diff -crB net-snmp-5.4.2.1/agent/mibgroup/mibII/tcp.c net-snmp-5.4.2.1.patch/agent/mibgroup/mibII/tcp.c *** net-snmp-5.4.2.1/agent/mibgroup/mibII/tcp.c 2008-06-05 15:11:53.000000000 -0600 --- net-snmp-5.4.2.1.patch/agent/mibgroup/mibII/tcp.c 2009-10-23 10:24:54.000000000 -0600 *************** *** 63,68 **** --- 63,69 ---- #endif #if defined(HAVE_LIBPERFSTAT_H) && (defined(aix4) || defined(aix5) || defined(aix6)) && !defined(FIRST_PROTOCOL) + #include <sys/protosw.h> #include <libperfstat.h> #ifdef FIRST_PROTOCOL perfstat_protocol_t ps_proto; diff -crB net-snmp-5.4.2.1/agent/mibgroup/mibII/udp.c net-snmp-5.4.2.1.patch/agent/mibgroup/mibII/udp.c *** net-snmp-5.4.2.1/agent/mibgroup/mibII/udp.c 2008-06-05 15:11:53.000000000 -0600 --- net-snmp-5.4.2.1.patch/agent/mibgroup/mibII/udp.c 2009-10-23 10:24:40.000000000 -0600 *************** *** 58,63 **** --- 58,64 ---- #endif #if defined(HAVE_LIBPERFSTAT_H) && (defined(aix4) || defined(aix5) || defined(aix6)) && !defined(FIRST_PROTOCOL) + #include <sys/protosw.h> #include <libperfstat.h> #ifdef FIRST_PROTOCOL perfstat_protocol_t ps_proto; diff -crB net-snmp-5.4.2.1/agent/mibgroup/ucd-snmp/diskio.c net-snmp-5.4.2.1.patch/agent/mibgroup/ucd-snmp/diskio.c *** net-snmp-5.4.2.1/agent/mibgroup/ucd-snmp/diskio.c 2008-06-05 15:11:53.000000000 -0600 --- net-snmp-5.4.2.1.patch/agent/mibgroup/ucd-snmp/diskio.c 2009-10-23 10:25:35.000000000 -0600 *************** *** 51,61 **** --- 51,63 ---- static kstat_io_t kio; static int cache_disknr = -1; #endif /* solaris2 */ + #include <sys/protosw.h> #if defined(aix4) || defined(aix5) || defined(aix6) /* * handle disk statistics via libperfstat */ + #include <sys/protosw.h> #include <libperfstat.h> static perfstat_disk_t *ps_disk; /* storage for all disk values */ static int ps_numdisks; /* number of disks in system, may change while running */ diff -crB net-snmp-5.4.2.1/agent/mibgroup/ucd-snmp/loadave.c net-snmp-5.4.2.1.patch/agent/mibgroup/ucd-snmp/loadave.c *** net-snmp-5.4.2.1/agent/mibgroup/ucd-snmp/loadave.c 2008-06-05 15:11:53.000000000 -0600 --- net-snmp-5.4.2.1.patch/agent/mibgroup/ucd-snmp/loadave.c 2009-10-23 10:25:45.000000000 -0600 *************** *** 120,125 **** --- 120,126 ---- #include <sys/pstat.h> #endif #if defined(aix4) || defined(aix5) || defined(aix6) + #include <sys/protosw.h> #include <libperfstat.h> #endif #if HAVE_SYS_SYSGET_H diff -crB net-snmp-5.4.2.1/agent/mibgroup/ucd-snmp/memory_aix4.c net-snmp-5.4.2.1.patch/agent/mibgroup/ucd-snmp/memory_aix4.c *** net-snmp-5.4.2.1/agent/mibgroup/ucd-snmp/memory_aix4.c 2006-09-14 18:48:50.000000000 -0600 --- net-snmp-5.4.2.1.patch/agent/mibgroup/ucd-snmp/memory_aix4.c 2009-10-23 10:25:12.000000000 -0600 *************** *** 34,39 **** --- 34,40 ---- #include "memory.h" /* the module-specific header */ #include "memory_aix4.h" /* the module-specific header */ + #include <sys/protosw.h> #include <libperfstat.h> #include <sys/stat.h> #include <unistd.h> diff -crB net-snmp-5.4.2.1/agent/mibgroup/ucd-snmp/vmstat_aix4.c net-snmp-5.4.2.1.patch/agent/mibgroup/ucd-snmp/vmstat_aix4.c *** net-snmp-5.4.2.1/agent/mibgroup/ucd-snmp/vmstat_aix4.c 2006-09-14 18:48:50.000000000 -0600 --- net-snmp-5.4.2.1.patch/agent/mibgroup/ucd-snmp/vmstat_aix4.c 2009-10-23 10:26:09.000000000 -0600 *************** *** 39,44 **** --- 39,45 ---- /* * libperfstat structs */ + #include <sys/protosw.h> #include <libperfstat.h> #include <net-snmp/net-snmp-config.h>