29 |
#include <netdb.h> |
#include <netdb.h> |
30 |
#include <arpa/inet.h> |
#include <arpa/inet.h> |
31 |
#include <unistd.h> |
#include <unistd.h> |
32 |
#include <pthread.h> |
#if defined(USE_PTHREAD) |
33 |
|
# include <pthread.h> |
34 |
|
#endif |
35 |
#if defined(HAVE_SYS_SELECT_H) |
#if defined(HAVE_SYS_SELECT_H) |
36 |
# include <sys/select.h> |
# include <sys/select.h> |
37 |
#endif |
#endif |
47 |
3, /* timeout */ |
3, /* timeout */ |
48 |
}; |
}; |
49 |
|
|
50 |
|
#if defined(USE_PTHREAD) |
51 |
static pthread_once_t snmp_errno_once = PTHREAD_ONCE_INIT; |
static pthread_once_t snmp_errno_once = PTHREAD_ONCE_INIT; |
52 |
static pthread_key_t snmp_errno_key; |
static pthread_key_t snmp_errno_key; |
53 |
|
|
79 |
} |
} |
80 |
return p; |
return p; |
81 |
} |
} |
82 |
|
#else |
83 |
|
static int __snmp_errno; |
84 |
|
|
85 |
|
int * |
86 |
|
__snmp_errno_location() |
87 |
|
{ |
88 |
|
return &__snmp_errno; |
89 |
|
} |
90 |
|
#endif |
91 |
|
|
92 |
int |
int |
93 |
snmp_req_id() |
snmp_req_id() |
94 |
{ |
{ |