Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joey Salazar
BIND
Commits
d8f2dd46
Commit
d8f2dd46
authored
Dec 19, 2014
by
Mark Andrews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4025. [port] bsdi: failed to build. [RT #38047]
parent
d5ece58e
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
241 additions
and
59 deletions
+241
-59
CHANGES
CHANGES
+2
-0
config.h.in
config.h.in
+9
-0
configure
configure
+80
-0
configure.in
configure.in
+33
-1
lib/irs/getnameinfo.c
lib/irs/getnameinfo.c
+4
-3
lib/isc/include/isc/platform.h.in
lib/isc/include/isc/platform.h.in
+5
-0
lib/isc/tests/random_test.c
lib/isc/tests/random_test.c
+54
-54
lib/isc/unix/include/isc/net.h
lib/isc/unix/include/isc/net.h
+28
-0
lib/isc/unix/net.c
lib/isc/unix/net.c
+10
-0
lib/isc/unix/socket.c
lib/isc/unix/socket.c
+1
-1
lib/isc/unix/stdio.c
lib/isc/unix/stdio.c
+8
-0
lib/isc/win32/include/isc/platform.h.in
lib/isc/win32/include/isc/platform.h.in
+1
-0
lib/samples/sample-request.c
lib/samples/sample-request.c
+2
-0
lib/samples/sample-update.c
lib/samples/sample-update.c
+4
-0
No files found.
CHANGES
View file @
d8f2dd46
4025. [port] bsdi: failed to build. [RT #38047]
4024. [bug] dns_rdata_opt_first, dns_rdata_opt_next,
dns_rdata_opt_current, dns_rdata_txt_first,
dns_rdata_txt_next and dns_rdata_txt_current were
...
...
config.h.in
View file @
d8f2dd46
...
...
@@ -221,6 +221,12 @@ int sigwait(const unsigned int *set, int *sig);
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `fseeko' function. */
#undef HAVE_FSEEKO
/* Define to 1 if you have the `ftello' function. */
#undef HAVE_FTELLO
/* Build with GeoIP support */
#undef HAVE_GEOIP
...
...
@@ -464,6 +470,9 @@ int sigwait(const unsigned int *set, int *sig);
/* Define to the flags type used by getnameinfo(3). */
#undef IRS_GETNAMEINFO_FLAGS_T
/* Define to the sockaddr length type used by getnameinfo(3). */
#undef IRS_GETNAMEINFO_SOCKLEN_T
/* Define to allow building of objects for dlopen(). */
#undef ISC_DLZ_DLOPEN
...
...
configure
View file @
d8f2dd46
...
...
@@ -768,6 +768,7 @@ ISC_IPV6_C
ISC_ISCIPV6_O
ISC_IPV6_O
ISC_IPV6_H
ISC_PLATFORM_HAVESOCKADDRSTORAGE
ISC_PLATFORM_FIXIN6ISADDR
ISC_PLATFORM_HAVEIN6PKTINFO
LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK
...
...
@@ -13028,6 +13029,20 @@ fi
done
# BSDI doesn't have ftello fseeko
for ac_func in ftello fseeko
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
#
# UnixWare 7.1.1 with the feature supplement to the UDK compiler
# is reported to not support "static inline" (RT #1212).
...
...
@@ -17608,6 +17623,36 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
$as_echo_n "checking for struct sockaddr_storage... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/socket.h>
$isc_netinetin6_hack
$isc_netinet6in6_hack
int
main ()
{
struct sockaddr_storage storage; return (0);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
ISC_PLATFORM_HAVESOCKADDRSTORAGE="#define ISC_PLATFORM_HAVESOCKADDRSTORAGE 1"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
ISC_PLATFORM_HAVESOCKADDRSTORAGE="#undef ISC_PLATFORM_HAVESOCKADDRSTORAGE"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
...
...
@@ -18145,6 +18190,9 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: socklen_t for buflen; u_int for flags" >&5
$as_echo "socklen_t for buflen; u_int for flags" >&6; }
$as_echo "#define IRS_GETNAMEINFO_SOCKLEN_T socklen_t" >>confdefs.h
$as_echo "#define IRS_GETNAMEINFO_BUFLEN_T socklen_t" >>confdefs.h
...
...
@@ -18170,6 +18218,34 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: size_t for buflen; int for flags" >&5
$as_echo "size_t for buflen; int for flags" >&6; }
$as_echo "#define IRS_GETNAMEINFO_SOCKLEN_T socklen_t" >>confdefs.h
$as_echo "#define IRS_GETNAMEINFO_BUFLEN_T size_t" >>confdefs.h
$as_echo "#define IRS_GETNAMEINFO_FLAGS_T int" >>confdefs.h
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int getnameinfo(const struct sockaddr *, size_t, char *,
size_t, char *, size_t, int);
int
main ()
{
return (0);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: size_t for buflen; int for flags" >&5
$as_echo "size_t for buflen; int for flags" >&6; }
$as_echo "#define IRS_GETNAMEINFO_SOCKLEN_T size_t" >>confdefs.h
$as_echo "#define IRS_GETNAMEINFO_BUFLEN_T size_t" >>confdefs.h
$as_echo "#define IRS_GETNAMEINFO_FLAGS_T int" >>confdefs.h
...
...
@@ -18177,6 +18253,8 @@ $as_echo "size_t for buflen; int for flags" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not match any subspecies; assume standard definition" >&5
$as_echo "not match any subspecies; assume standard definition" >&6; }
$as_echo "#define IRS_GETNAMEINFO_SOCKLEN_T socklen_t" >>confdefs.h
$as_echo "#define IRS_GETNAMEINFO_BUFLEN_T socklen_t" >>confdefs.h
$as_echo "#define IRS_GETNAMEINFO_FLAGS_T int" >>confdefs.h
...
...
@@ -18185,6 +18263,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#
# ...and same for gai_strerror().
...
...
configure.in
View file @
d8f2dd46
...
...
@@ -486,6 +486,9 @@ AC_CHECK_FUNCS(mmap)
AC_CHECK_FUNCS(seteuid setresuid)
AC_CHECK_FUNCS(setegid setresgid)
# BSDI doesn't have ftello fseeko
AC_CHECK_FUNCS(ftello fseeko)
#
# UnixWare 7.1.1 with the feature supplement to the UDK compiler
# is reported to not support "static inline" (RT #1212).
...
...
@@ -2737,6 +2740,19 @@ $isc_netinet6in6_hack
;;
esac
AC_MSG_CHECKING(for struct sockaddr_storage)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
$isc_netinetin6_hack
$isc_netinet6in6_hack
],
[struct sockaddr_storage storage; return (0);],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_HAVESOCKADDRSTORAGE="#define ISC_PLATFORM_HAVESOCKADDRSTORAGE 1"],
[AC_MSG_RESULT(no)
ISC_PLATFORM_HAVESOCKADDRSTORAGE="#undef ISC_PLATFORM_HAVESOCKADDRSTORAGE"])
AC_SUBST(ISC_PLATFORM_HAVEIPV6)
AC_SUBST(LWRES_PLATFORM_HAVEIPV6)
AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
...
...
@@ -2751,6 +2767,7 @@ AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK)
AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
AC_SUBST(ISC_PLATFORM_HAVESOCKADDRSTORAGE)
AC_SUBST(ISC_IPV6_H)
AC_SUBST(ISC_IPV6_O)
AC_SUBST(ISC_ISCIPV6_O)
...
...
@@ -3000,6 +3017,8 @@ int getnameinfo(const struct sockaddr *, socklen_t, char *,
socklen_t, char *, socklen_t, unsigned int);],
[ return (0);],
[AC_MSG_RESULT(socklen_t for buflen; u_int for flags)
AC_DEFINE(IRS_GETNAMEINFO_SOCKLEN_T, socklen_t,
[Define to the sockaddr length type used by getnameinfo(3).])
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t,
[Define to the buffer length type used by getnameinfo(3).])
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, unsigned int,
...
...
@@ -3012,11 +3031,24 @@ int getnameinfo(const struct sockaddr *, socklen_t, char *,
size_t, char *, size_t, int);],
[ return (0);],
[AC_MSG_RESULT(size_t for buflen; int for flags)
AC_DEFINE(IRS_GETNAMEINFO_SOCKLEN_T, socklen_t)
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, size_t)
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)],
[AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int getnameinfo(const struct sockaddr *, size_t, char *,
size_t, char *, size_t, int);],
[ return (0);],
[AC_MSG_RESULT(size_t for buflen; int for flags)
AC_DEFINE(IRS_GETNAMEINFO_SOCKLEN_T, size_t)
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, size_t)
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)],
[AC_MSG_RESULT(not match any subspecies; assume standard definition)
AC_DEFINE(IRS_GETNAMEINFO_SOCKLEN_T, socklen_t)
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t)
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)])])
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)])])
])
#
# ...and same for gai_strerror().
...
...
lib/irs/getnameinfo.c
View file @
d8f2dd46
...
...
@@ -143,9 +143,10 @@ static struct afd {
} while (0)
int
getnameinfo
(
const
struct
sockaddr
*
sa
,
socklen_t
salen
,
char
*
host
,
IRS_GETNAMEINFO_BUFLEN_T
hostlen
,
char
*
serv
,
IRS_GETNAMEINFO_BUFLEN_T
servlen
,
IRS_GETNAMEINFO_FLAGS_T
flags
)
getnameinfo
(
const
struct
sockaddr
*
sa
,
IRS_GETNAMEINFO_SOCKLEN_T
salen
,
char
*
host
,
IRS_GETNAMEINFO_BUFLEN_T
hostlen
,
char
*
serv
,
IRS_GETNAMEINFO_BUFLEN_T
servlen
,
IRS_GETNAMEINFO_FLAGS_T
flags
)
{
struct
afd
*
afd
=
NULL
;
struct
servent
*
sp
;
...
...
lib/isc/include/isc/platform.h.in
View file @
d8f2dd46
...
...
@@ -131,6 +131,11 @@
*/
@ISC_PLATFORM_FIXIN6ISADDR@
/*! \brief
* Define if the system has struct sockaddr_storage.
*/
@ISC_PLATFORM_HAVESOCKADDRSTORAGE@
/*! \brief
* Define if the system supports kqueue multiplexing
*/
...
...
lib/isc/tests/random_test.c
View file @
d8f2dd46
...
...
@@ -28,7 +28,7 @@
#include <math.h>
typedef
double
(
pvalue_func_t
)(
isc_mem_t
*
mctx
,
uint16_t
*
values
,
size_t
length
);
isc_
uint16_t
*
values
,
size_t
length
);
/* igamc(), igam(), etc. were adapted (and cleaned up) from the Cephes
* math library:
...
...
@@ -138,17 +138,17 @@ igam(double a, double x) {
return
(
ans
*
ax
/
a
);
}
static
int8_t
scounts_table
[
65536
];
static
uint8_t
bitcounts_table
[
65536
];
static
i
sc_i
nt8_t
scounts_table
[
65536
];
static
isc_
uint8_t
bitcounts_table
[
65536
];
static
int8_t
scount_calculate
(
uint16_t
n
)
{
static
i
sc_i
nt8_t
scount_calculate
(
isc_
uint16_t
n
)
{
int
i
;
int8_t
sc
;
i
sc_i
nt8_t
sc
;
sc
=
0
;
for
(
i
=
0
;
i
<
16
;
i
++
)
{
uint16_t
lsb
;
isc_
uint16_t
lsb
;
lsb
=
n
&
1
;
if
(
lsb
!=
0
)
...
...
@@ -162,14 +162,14 @@ scount_calculate(uint16_t n) {
return
(
sc
);
}
static
uint8_t
bitcount_calculate
(
uint16_t
n
)
{
static
isc_
uint8_t
bitcount_calculate
(
isc_
uint16_t
n
)
{
int
i
;
uint8_t
bc
;
isc_
uint8_t
bc
;
bc
=
0
;
for
(
i
=
0
;
i
<
16
;
i
++
)
{
uint16_t
lsb
;
isc_
uint16_t
lsb
;
lsb
=
n
&
1
;
if
(
lsb
!=
0
)
...
...
@@ -183,7 +183,7 @@ bitcount_calculate(uint16_t n) {
static
void
tables_init
(
void
)
{
uint32_t
i
;
isc_
uint32_t
i
;
for
(
i
=
0
;
i
<
65536
;
i
++
)
{
scounts_table
[
i
]
=
scount_calculate
(
i
);
...
...
@@ -198,12 +198,12 @@ tables_init(void) {
*
* This function destroys (modifies) the data passed in bits.
*/
static
uint32_t
matrix_binaryrank
(
uint32_t
*
bits
,
ssize_t
rows
,
ssize_t
cols
)
{
static
isc_
uint32_t
matrix_binaryrank
(
isc_
uint32_t
*
bits
,
ssize_t
rows
,
ssize_t
cols
)
{
ssize_t
i
,
j
,
k
;
int
rt
=
0
;
uint32_t
rank
=
0
;
uint32_t
tmp
;
isc_
uint32_t
rank
=
0
;
isc_
uint32_t
tmp
;
for
(
k
=
0
;
k
<
rows
;
k
++
)
{
i
=
k
;
...
...
@@ -249,10 +249,10 @@ random_test(pvalue_func_t *func) {
isc_mem_t
*
mctx
=
NULL
;
isc_result_t
result
;
isc_rng_t
*
rng
;
uint32_t
m
;
uint32_t
j
;
uint32_t
histogram
[
11
];
uint32_t
passed
;
isc_
uint32_t
m
;
isc_
uint32_t
j
;
isc_
uint32_t
histogram
[
11
];
isc_
uint32_t
passed
;
double
proportion
;
double
p_hat
;
double
lower_confidence
;
...
...
@@ -275,8 +275,8 @@ random_test(pvalue_func_t *func) {
histogram
[
j
]
=
0
;
for
(
j
=
0
;
j
<
m
;
j
++
)
{
uint32_t
i
;
uint16_t
values
[
128000
];
isc_
uint32_t
i
;
isc_
uint16_t
values
[
128000
];
double
p_value
;
for
(
i
=
0
;
i
<
128000
;
i
++
)
...
...
@@ -350,10 +350,10 @@ random_test(pvalue_func_t *func) {
* RNG test suite.
*/
static
double
monobit
(
isc_mem_t
*
mctx
,
uint16_t
*
values
,
size_t
length
)
{
monobit
(
isc_mem_t
*
mctx
,
isc_
uint16_t
*
values
,
size_t
length
)
{
size_t
i
;
int32_t
scount
;
uint32_t
numbits
;
i
sc_i
nt32_t
scount
;
isc_
uint32_t
numbits
;
double
s_obs
;
double
p_value
;
...
...
@@ -381,17 +381,17 @@ monobit(isc_mem_t *mctx, uint16_t *values, size_t length) {
* This is the runs test taken from the NIST SP 800-22 RNG test suite.
*/
static
double
runs
(
isc_mem_t
*
mctx
,
uint16_t
*
values
,
size_t
length
)
{
runs
(
isc_mem_t
*
mctx
,
isc_
uint16_t
*
values
,
size_t
length
)
{
size_t
i
;
uint32_t
bcount
;
uint32_t
numbits
;
isc_
uint32_t
bcount
;
isc_
uint32_t
numbits
;
double
pi
;
double
tau
;
uint32_t
j
;
uint32_t
b
;
uint8_t
bit_this
;
uint8_t
bit_prev
;
uint32_t
v_obs
;
isc_
uint32_t
j
;
isc_
uint32_t
b
;
isc_
uint8_t
bit_this
;
isc_
uint8_t
bit_prev
;
isc_
uint32_t
v_obs
;
double
numer
;
double
denom
;
double
p_value
;
...
...
@@ -457,14 +457,14 @@ runs(isc_mem_t *mctx, uint16_t *values, size_t length) {
* test suite.
*/
static
double
blockfrequency
(
isc_mem_t
*
mctx
,
uint16_t
*
values
,
size_t
length
)
{
uint32_t
i
;
uint32_t
numbits
;
uint32_t
mbits
;
uint32_t
mwords
;
uint32_t
numblocks
;
blockfrequency
(
isc_mem_t
*
mctx
,
isc_
uint16_t
*
values
,
size_t
length
)
{
isc_
uint32_t
i
;
isc_
uint32_t
numbits
;
isc_
uint32_t
mbits
;
isc_
uint32_t
mwords
;
isc_
uint32_t
numblocks
;
double
*
pi
;
uint32_t
cur_word
;
isc_
uint32_t
cur_word
;
double
chi_square
;
double
p_value
;
...
...
@@ -487,10 +487,10 @@ blockfrequency(isc_mem_t *mctx, uint16_t *values, size_t length) {
cur_word
=
0
;
for
(
i
=
0
;
i
<
numblocks
;
i
++
)
{
uint32_t
j
;
isc_
uint32_t
j
;
pi
[
i
]
=
0
.
0
;
for
(
j
=
0
;
j
<
mwords
;
j
++
)
{
uint32_t
idx
;
isc_
uint32_t
idx
;
idx
=
i
*
mwords
+
j
;
pi
[
i
]
+=
bitcounts_table
[
values
[
idx
]];
...
...
@@ -521,15 +521,15 @@ blockfrequency(isc_mem_t *mctx, uint16_t *values, size_t length) {
* test suite.
*/
static
double
binarymatrixrank
(
isc_mem_t
*
mctx
,
uint16_t
*
values
,
size_t
length
)
{
uint32_t
i
;
binarymatrixrank
(
isc_mem_t
*
mctx
,
isc_
uint16_t
*
values
,
size_t
length
)
{
isc_
uint32_t
i
;
size_t
matrix_m
;
size_t
matrix_q
;
uint32_t
num_matrices
;
isc_
uint32_t
num_matrices
;
size_t
numbits
;
uint32_t
fm_0
;
uint32_t
fm_1
;
uint32_t
fm_rest
;
isc_
uint32_t
fm_0
;
isc_
uint32_t
fm_1
;
isc_
uint32_t
fm_rest
;
double
term1
;
double
term2
;
double
term3
;
...
...
@@ -553,17 +553,17 @@ binarymatrixrank(isc_mem_t *mctx, uint16_t *values, size_t length) {
fm_rest
=
0
;
for
(
i
=
0
;
i
<
num_matrices
;
i
++
)
{
/*
* Each uint32_t supplies 32 bits, so a 32x32 bit matrix
* takes up uint32_t array of size 32.
* Each
isc_
uint32_t supplies 32 bits, so a 32x32 bit matrix
* takes up
isc_
uint32_t array of size 32.
*/
uint32_t
bits
[
32
];
isc_
uint32_t
bits
[
32
];
int
j
;
uint32_t
rank
;
isc_
uint32_t
rank
;
for
(
j
=
0
;
j
<
32
;
j
++
)
{
size_t
idx
;
uint32_t
r1
;
uint32_t
r2
;
isc_
uint32_t
r1
;
isc_
uint32_t
r2
;
idx
=
i
*
((
matrix_m
*
matrix_q
)
/
16
);
idx
+=
j
*
2
;
...
...
lib/isc/unix/include/isc/net.h
View file @
d8f2dd46
...
...
@@ -37,6 +37,7 @@
*\li struct sockaddr
*\li struct sockaddr_in
*\li struct sockaddr_in6
*\li struct sockaddr_storage
*\li in_port_t
*
* It ensures that the AF_ and PF_ macros are defined.
...
...
@@ -187,6 +188,33 @@ struct in6_pktinfo {
};
#endif
#ifndef ISC_PLATFORM_HAVESOCKADDRSTORAGE
#define _SS_MAXSIZE 128
#define _SS_ALIGNSIZE (sizeof (isc_uint64_t))
#ifdef ISC_PLATFORM_HAVESALEN
#define _SS_PAD1SIZE (_SS_ALIGNSIZE - (2 * sizeof(isc_uint8_t)))
#define _SS_PAD2SIZE (_SS_MAXSIZE - (_SS_ALIGNSIZE + _SS_PAD1SIZE \
+ 2 * sizeof(isc_uint8_t)))
#else
#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(isc_uint16_t))
#define _SS_PAD2SIZE (_SS_MAXSIZE - (_SS_ALIGNSIZE + _SS_PAD1SIZE \
+ sizeof(isc_uint16_t)))
#endif
struct
sockaddr_storage
{
#ifdef ISC_PLATFORM_HAVESALEN
isc_uint8_t
ss_len
;
isc_uint8_t
ss_family
;
#else
isc_uint16_t
ss_family
;
#endif
char
__ss_pad1
[
_SS_PAD1SIZE
];
isc_uint64_t
__ss_align
;
/* field to force desired structure */
char
__ss_pad2
[
_SS_PAD2SIZE
];
};
#endif
#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
extern
const
struct
in6_addr
isc_net_in6addrany
;
/*%
...
...
lib/isc/unix/net.c
View file @
d8f2dd46
...
...
@@ -326,6 +326,7 @@ initialize_ipv6only(void) {
#endif
/* WANT_IPV6 */
#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
#ifdef WANT_IPV6
static
void
try_ipv6pktinfo
(
void
)
{
int
s
,
on
;
...
...
@@ -377,6 +378,7 @@ initialize_ipv6pktinfo(void) {
RUNTIME_CHECK
(
isc_once_do
(
&
once_ipv6pktinfo
,
try_ipv6pktinfo
)
==
ISC_R_SUCCESS
);
}
#endif
/* WANT_IPV6 */
#endif
/* ISC_PLATFORM_HAVEIN6PKTINFO */
#endif
/* ISC_PLATFORM_HAVEIPV6 */
...
...
@@ -620,7 +622,11 @@ try_dscp_v4(void) {
hints
.
ai_family
=
AF_INET
;
hints
.
ai_socktype
=
SOCK_DGRAM
;
hints
.
ai_protocol
=
IPPROTO_UDP
;
#ifdef AI_NUMERICHOST
hints
.
ai_flags
=
AI_PASSIVE
|
AI_NUMERICHOST
;
#else
hints
.
ai_flags
=
AI_PASSIVE
;
#endif
n
=
getaddrinfo
(
"127.0.0.1"
,
NULL
,
&
hints
,
&
res0
);
if
(
n
!=
0
||
res0
==
NULL
)
{
...
...
@@ -689,7 +695,11 @@ try_dscp_v6(void) {
hints
.
ai_family
=
AF_INET6
;
hints
.
ai_socktype
=
SOCK_DGRAM
;
hints
.
ai_protocol
=
IPPROTO_UDP
;
#ifdef AI_NUMERICHOST
hints
.
ai_flags
=
AI_PASSIVE
|
AI_NUMERICHOST
;
#else
hints
.
ai_flags
=
AI_PASSIVE
;
#endif
n
=
getaddrinfo
(
"::1"
,
NULL
,
&
hints
,
&
res0
);
if
(
n
!=
0
||
res0
==
NULL
)
{
...
...
lib/isc/unix/socket.c
View file @
d8f2dd46
...
...
@@ -1388,7 +1388,7 @@ process_cmsg(isc__socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) {
||
cmsgp
->
cmsg_type
==
IP_RECVTOS
#endif
))
{
dev
->
dscp
=
(
int
)
*
(
u
int8_t
*
)
CMSG_DATA
(
cmsgp
);
dev
->
dscp
=
(
int
)
*
(
u
nsigned
char
*
)
CMSG_DATA
(
cmsgp
);
dev
->
dscp
>>=
2
;
dev
->
attributes
|=
ISC_SOCKEVENTATTR_DSCP
;
goto
next
;
...
...
lib/isc/unix/stdio.c
View file @
d8f2dd46
...
...
@@ -54,7 +54,11 @@ isc_result_t
isc_stdio_seek
(
FILE
*
f
,
off_t
offset
,
int
whence
)
{
int
r
;
#ifdef HAVE_FSEEKO
r
=
fseeko
(
f
,
offset
,
whence
);
#else
r
=
fseek
(
f
,
offset
,
whence
);
#endif
if
(
r
==
0
)
return
(
ISC_R_SUCCESS
);
else
...
...
@@ -67,7 +71,11 @@ isc_stdio_tell(FILE *f, off_t *offsetp) {
REQUIRE
(
offsetp
!=
NULL
);
#ifdef HAVE_FTELLO
r
=
ftello
(
f
);
#else
r
=
ftell
(
f
);
#endif
if
(
r
>=
0
)
{
*
offsetp
=
r
;
return
(
ISC_R_SUCCESS
);
...
...
lib/isc/win32/include/isc/platform.h.in
View file @
d8f2dd46
...
...
@@ -39,6 +39,7 @@
#undef MSG_TRUNC
#define ISC_PLATFORM_NEEDNTOP
#define ISC_PLATFORM_NEEDPTON
#define ISC_PLATFORM_HAVESOCKADDRSTORAGE
#define ISC_PLATFORM_QUADFORMAT "I64"
...
...
lib/samples/sample-request.c
View file @
d8f2dd46
...
...
@@ -218,7 +218,9 @@ main(int argc, char *argv[]) {
hints
.
ai_family
=
AF_UNSPEC
;
hints
.
ai_socktype
=
SOCK_DGRAM
;
hints
.
ai_protocol
=
IPPROTO_UDP
;
#ifdef AI_NUMERICHOST
hints
.
ai_flags
=
AI_NUMERICHOST
;
#endif
gai_error
=
getaddrinfo
(
argv
[
0
],
"53"
,
&
hints
,
&
res
);
if
(
gai_error
!=
0
)
{
fprintf
(
stderr
,
"getaddrinfo failed: %s
\n
"
,
...
...
lib/samples/sample-update.c
View file @
d8f2dd46
...
...
@@ -185,7 +185,9 @@ main(int argc, char *argv[]) {
hints
.
ai_family
=
AF_UNSPEC
;
hints
.
ai_socktype
=
SOCK_DGRAM
;
hints
.
ai_protocol
=
IPPROTO_UDP
;
#ifdef AI_NUMERICHOST
hints
.
ai_flags
=
AI_NUMERICHOST
;
#endif
gai_error
=
getaddrinfo
(
auth_server
,
"53"
,
&
hints
,
&
res
);
if
(
gai_error
!=
0
)
{
fprintf
(
stderr
,
"getaddrinfo failed: %s
\n
"
,
...
...
@@ -207,7 +209,9 @@ main(int argc, char *argv[]) {
hints
.
ai_family
=
AF_UNSPEC
;
hints
.
ai_socktype
=
SOCK_DGRAM
;
hints
.
ai_protocol
=
IPPROTO_UDP
;
#ifdef AI_NUMERICHOST
hints
.
ai_flags
=
AI_NUMERICHOST
;
#endif
gai_error
=
getaddrinfo
(
recursive_server
,
"53"
,
&
hints
,
&
res
);
if
(
gai_error
!=
0
)
{
fprintf
(
stderr
,
"getaddrinfo failed: %s
\n
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment