Files
Ryan Schmidt 895446a3e6 ifstat: Fix +snmp variant and encoding of ifstat -v
Fix implicit declaration of functions and other problems caused by
missing headers in tests for snmp functionality that caused the +snmp
variant not to include snmp functionality when compiled by Xcode 12 or
later.

Change encoding of ifstat.c from ISO8859-1 to UTF-8 to fix incorrect
output when running "ifstat -v".
2021-06-26 02:31:01 -05:00

40 lines
1.4 KiB
Diff

Fix:
error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
error: implicit declaration of function 'snmp_sess_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
error: too few arguments to function call, expected 1, have 0
error: unknown type name 'netsnmp_transport'
--- configure.orig 2004-01-01 13:18:14.000000000 -0600
+++ configure 2021-06-26 02:22:13.000000000 -0500
@@ -1059,6 +1059,7 @@
#line 1060 "configure"
#include "confdefs.h"
#include <ctype.h>
+#include <stdlib.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
@@ -2917,6 +2918,8 @@
#line 2918 "configure"
#include "confdefs.h"
#include<net-snmp/net-snmp-config.h>
+#include<net-snmp/library/snmp_transport.h>
+#include<net-snmp/session_api.h>
int main() {
snmp_sess_init((void *) 0);
; return 0; }
@@ -3046,9 +3049,12 @@
cat > conftest.$ac_ext <<EOF
#line 3048 "configure"
#include "confdefs.h"
+#include<net-snmp/net-snmp-config.h>
+#include<net-snmp/library/snmp_transport.h>
+#include<net-snmp/session_api.h>
int main() {
-snmp_sess_init();
+snmp_sess_init((void *) 0);
; return 0; }
EOF
if { (eval echo configure:3055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then