diff options
author | des <des@FreeBSD.org> | 2004-03-15 17:08:28 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2004-03-15 17:08:28 +0000 |
commit | a52d3498dd4aaef64ef78f0b57a1adc9f2b9aff6 (patch) | |
tree | be5048c9333618ac9ad12af2dcc7407aa9c2c6fd | |
parent | c1888d71d13e0e908e53ad2108485bbfa1c139e5 (diff) | |
download | FreeBSD-src-a52d3498dd4aaef64ef78f0b57a1adc9f2b9aff6.zip FreeBSD-src-a52d3498dd4aaef64ef78f0b57a1adc9f2b9aff6.tar.gz |
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.
-rw-r--r-- | include/resolv.h | 4 | ||||
-rw-r--r-- | lib/libc/net/res_send.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/resolv.h b/include/resolv.h index 942d2d6..800f73c 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -180,14 +180,14 @@ struct __res_state_ext { typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error } 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, int *querylen, u_char *ans, int anssiz, 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, int querylen, u_char *ans, diff --git a/lib/libc/net/res_send.c b/lib/libc/net/res_send.c index d39bbc5..6885ffd 100644 --- a/lib/libc/net/res_send.c +++ b/lib/libc/net/res_send.c @@ -415,7 +415,7 @@ res_send(buf, buflen, ans, anssiz) do { res_sendhookact act; - act = (*Qhook)((struct sockaddr_in **)&nsap, + act = (*Qhook)(&nsap, &buf, &buflen, ans, anssiz, &resplen); switch (act) { @@ -871,7 +871,7 @@ read_len: do { res_sendhookact act; - act = (*Rhook)((struct sockaddr_in *)nsap, + act = (*Rhook)(nsap, buf, buflen, ans, anssiz, &resplen); switch (act) { |