Index: net-mgmt/net-snmp/Makefile =================================================================== --- net-mgmt/net-snmp/Makefile (revision 566873) +++ net-mgmt/net-snmp/Makefile (working copy) @@ -3,7 +3,7 @@ PORTNAME= snmp PORTVERSION= 5.9 -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 1 CATEGORIES= net-mgmt MASTER_SITES= SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION} \ Index: net-mgmt/net-snmp/files/patch-agent_auto__nlist.c =================================================================== --- net-mgmt/net-snmp/files/patch-agent_auto__nlist.c (nonexistent) +++ net-mgmt/net-snmp/files/patch-agent_auto__nlist.c (working copy) @@ -0,0 +1,50 @@ +--- agent/auto_nlist.c.orig 2020-08-14 17:41:47 UTC ++++ agent/auto_nlist.c +@@ -142,6 +142,38 @@ auto_nlist(const char *string, char *var, size_t size) + return 0; + } + ++#if HAVE_KVM_OPENFILES ++static int ++get_nlist(kvm_t *kernel, struct nlist nl[]) ++{ ++#ifdef __FreeBSD__ ++ struct kvm_nlist *kl; ++ int count, i, ret; ++ ++ for (count = 0; nl[count].n_name != NULL && nl[count].n_name[0] != '\0'; count++) ++ ; ++ if (count == 0) ++ return 0; ++ kl = calloc(count + 1, sizeof(*kl)); ++ if (kl == NULL) ++ return -1; ++ for (i = 0; i < count; i++) ++ kl[i].n_name = nl[i].n_name; ++ if ((ret = kvm_nlist2(kernel, kl)) != -1) ++ for (i = 0; i < count; i++) { ++ nl[i].n_type = kl[i].n_type; ++ nl[i].n_other = 0; ++ nl[i].n_desc = 0; ++ nl[i].n_value = kl[i].n_value; ++ } ++ free(kl); ++ return ret; ++#else ++ return kvm_nlist(kernel, nl); ++#endif ++} ++#endif ++ + static void + init_nlist(struct nlist nl[]) + { +@@ -161,7 +193,7 @@ init_nlist(struct nlist nl[]) + exit(1); + } + } +- if ((ret = kvm_nlist(kernel, nl)) == -1) { ++ if ((ret = get_nlist(kernel, nl)) == -1) { + if (netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) { + return; Property changes on: net-mgmt/net-snmp/files/patch-agent_auto__nlist.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property