dont use initstate/setstate
This commit is contained in:
@@ -184,13 +184,11 @@ AC_CHECK_FUNCS([ \
|
||||
getprogname \
|
||||
getrlimit \
|
||||
getspnam \
|
||||
initstate \
|
||||
issetugid \
|
||||
on_exit \
|
||||
poll \
|
||||
random \
|
||||
setprogname \
|
||||
setstate \
|
||||
strsvis \
|
||||
strsvisx \
|
||||
strunvis \
|
||||
|
@@ -630,11 +630,6 @@ rk_dns_srv_order(struct rk_dns_reply *r)
|
||||
struct rk_resource_record *rr;
|
||||
int num_srv = 0;
|
||||
|
||||
#if defined(HAVE_INITSTATE) && defined(HAVE_SETSTATE)
|
||||
int state[256 / sizeof(int)];
|
||||
char *oldstate;
|
||||
#endif
|
||||
|
||||
rk_random_init();
|
||||
|
||||
for(rr = r->head; rr; rr = rr->next)
|
||||
@@ -662,10 +657,6 @@ rk_dns_srv_order(struct rk_dns_reply *r)
|
||||
/* sort them by priority and weight */
|
||||
qsort(srvs, num_srv, sizeof(*srvs), compare_srv);
|
||||
|
||||
#if defined(HAVE_INITSTATE) && defined(HAVE_SETSTATE)
|
||||
oldstate = initstate(time(NULL), (char*)state, sizeof(state));
|
||||
#endif
|
||||
|
||||
headp = &r->head;
|
||||
|
||||
for(ss = srvs; ss < srvs + num_srv; ) {
|
||||
@@ -706,9 +697,6 @@ rk_dns_srv_order(struct rk_dns_reply *r)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_INITSTATE) && defined(HAVE_SETSTATE)
|
||||
setstate(oldstate);
|
||||
#endif
|
||||
free(srvs);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user