Index: contrib/bsnmp/lib/asn1.c =================================================================== --- contrib/bsnmp/lib/asn1.c +++ contrib/bsnmp/lib/asn1.c @@ -1019,7 +1019,7 @@ char * asn_oid2str(const struct asn_oid *oid) { - static char str[ASN_OIDSTRLEN]; + __thread static char str[ASN_OIDSTRLEN]; return (asn_oid2str_r(oid, str)); } Index: contrib/bsnmp/lib/snmpclient.h =================================================================== --- contrib/bsnmp/lib/snmpclient.h +++ contrib/bsnmp/lib/snmpclient.h @@ -114,7 +114,7 @@ }; /* the global context */ -extern struct snmp_client snmp_client; +extern __thread struct snmp_client snmp_client; /* initizialies a snmp_client structure */ void snmp_client_init(struct snmp_client *); Index: contrib/bsnmp/lib/snmpclient.c =================================================================== --- contrib/bsnmp/lib/snmpclient.c +++ contrib/bsnmp/lib/snmpclient.c @@ -71,7 +71,7 @@ #define DEBUG_PARSE 0 /* global context */ -struct snmp_client snmp_client; +__thread struct snmp_client snmp_client; /* List of all outstanding requests */ struct sent_pdu { @@ -86,7 +86,7 @@ }; LIST_HEAD(sent_pdu_list, sent_pdu); -static struct sent_pdu_list sent_pdus; +__thread static struct sent_pdu_list sent_pdus; /* * Prototype table entry. All C-structure produced by the table function must