Don't try to pass off a struct sockaddr as a struct sockaddr_in when it
may in fact very well be a struct sockaddr_in6. Just use plain struct sockaddr. This brings us yet another step closer to a clean -O2 build.
This commit is contained in:
parent
7b1ac86dc1
commit
5b3ce02186
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=127028
@ -180,14 +180,14 @@ struct __res_state_ext {
|
|||||||
typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
|
typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
|
||||||
res_sendhookact;
|
res_sendhookact;
|
||||||
|
|
||||||
typedef res_sendhookact (*res_send_qhook)(struct sockaddr_in * const *ns,
|
typedef res_sendhookact (*res_send_qhook)(struct sockaddr * const *ns,
|
||||||
const u_char **query,
|
const u_char **query,
|
||||||
int *querylen,
|
int *querylen,
|
||||||
u_char *ans,
|
u_char *ans,
|
||||||
int anssiz,
|
int anssiz,
|
||||||
int *resplen);
|
int *resplen);
|
||||||
|
|
||||||
typedef res_sendhookact (*res_send_rhook)(const struct sockaddr_in *ns,
|
typedef res_sendhookact (*res_send_rhook)(const struct sockaddr *ns,
|
||||||
const u_char *query,
|
const u_char *query,
|
||||||
int querylen,
|
int querylen,
|
||||||
u_char *ans,
|
u_char *ans,
|
||||||
|
@ -415,7 +415,7 @@ res_send(buf, buflen, ans, anssiz)
|
|||||||
do {
|
do {
|
||||||
res_sendhookact act;
|
res_sendhookact act;
|
||||||
|
|
||||||
act = (*Qhook)((struct sockaddr_in **)&nsap,
|
act = (*Qhook)(&nsap,
|
||||||
&buf, &buflen,
|
&buf, &buflen,
|
||||||
ans, anssiz, &resplen);
|
ans, anssiz, &resplen);
|
||||||
switch (act) {
|
switch (act) {
|
||||||
@ -871,7 +871,7 @@ res_send(buf, buflen, ans, anssiz)
|
|||||||
do {
|
do {
|
||||||
res_sendhookact act;
|
res_sendhookact act;
|
||||||
|
|
||||||
act = (*Rhook)((struct sockaddr_in *)nsap,
|
act = (*Rhook)(nsap,
|
||||||
buf, buflen,
|
buf, buflen,
|
||||||
ans, anssiz, &resplen);
|
ans, anssiz, &resplen);
|
||||||
switch (act) {
|
switch (act) {
|
||||||
|
Loading…
Reference in New Issue
Block a user