Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Abuhujair Javed
Postgres FD Implementation
Commits
9df2c440
Commit
9df2c440
authored
Jan 09, 2003
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix IPv6 detection and IPv6 to 4 conversion to use only standard
interfaces.
parent
2e98da52
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
27 deletions
+27
-27
configure
configure
+15
-19
configure.in
configure.in
+6
-6
src/backend/libpq/ip.c
src/backend/libpq/ip.c
+6
-2
No files found.
configure
View file @
9df2c440
...
...
@@ -10027,16 +10027,16 @@ fi
echo
"
$as_me
:
$LINENO
: result:
$ac_cv_func_getaddrinfo
"
>
&5
echo
"
${
ECHO_T
}
$ac_cv_func_getaddrinfo
"
>
&6
if
test
$ac_cv_func_getaddrinfo
=
yes
;
then
echo
"
$as_me
:
$LINENO
: checking for struct sockaddr_in6
.sin6_len
"
>
&5
echo
$ECHO_N
"checking for struct sockaddr_in6.
sin6_len.
..
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_
member_struct_sockaddr_in6_sin6_len
+set
}
"
=
set
;
then
echo
"
$as_me
:
$LINENO
: checking for struct sockaddr_in6"
>
&5
echo
$ECHO_N
"checking for struct sockaddr_in6...
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_
type_struct_sockaddr_in6
+set
}
"
=
set
;
then
echo
$ECHO_N
"(cached)
$ECHO_C
"
>
&6
else
cat
>
conftest.
$ac_ext
<<
_ACEOF
#line
$LINENO
"configure"
#include "confdefs.h"
#include <sys/socket.h>
#include <net
db
.h>
$ac_includes_default
#include <net
inet/in
.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
...
...
@@ -10047,9 +10047,10 @@ else
int
main ()
{
static struct sockaddr_in6 ac_aggr;
if (ac_aggr.sin6_len)
return 0;
if ((struct sockaddr_in6 *) 0)
return 0;
if (sizeof (struct sockaddr_in6))
return 0;
;
return 0;
}
...
...
@@ -10066,23 +10067,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
;
then
ac_cv_
member_struct_sockaddr_in6_sin6_len
=
yes
ac_cv_
type_struct_sockaddr_in6
=
yes
else
echo
"
$as_me
: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
ac_cv_
member_struct_sockaddr_in6_sin6_len
=
no
ac_cv_
type_struct_sockaddr_in6
=
no
fi
rm
-f
conftest.
$ac_objext
conftest.
$ac_ext
fi
echo
"
$as_me
:
$LINENO
: result:
$ac_cv_member_struct_sockaddr_in6_sin6_len
"
>
&5
echo
"
${
ECHO_T
}
$ac_cv_member_struct_sockaddr_in6_sin6_len
"
>
&6
if
test
$ac_cv_member_struct_sockaddr_in6_sin6_len
=
yes
;
then
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN 1
_ACEOF
HAVE_IPV6
=
"yes"
;
cat
>>
confdefs.h
<<
\
_ACEOF
echo
"
$as_me
:
$LINENO
: result:
$ac_cv_type_struct_sockaddr_in6
"
>
&5
echo
"
${
ECHO_T
}
$ac_cv_type_struct_sockaddr_in6
"
>
&6
if
test
$ac_cv_type_struct_sockaddr_in6
=
yes
;
then
HAVE_IPV6
=
"yes"
;
cat
>>
confdefs.h
<<
\
_ACEOF
#define HAVE_IPV6 1
_ACEOF
...
...
configure.in
View file @
9df2c440
dnl Process this file with autoconf to produce a configure script.
dnl $Header: /cvsroot/pgsql/configure.in,v 1.23
0 2003/01/07 06:43:20 momjian
Exp $
dnl $Header: /cvsroot/pgsql/configure.in,v 1.23
1 2003/01/09 14:34:53 petere
Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
...
...
@@ -788,11 +788,11 @@ AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
# This exports HAVE_IPV6 to both C files and Makefiles
AC_CHECK_FUNC(getaddrinfo,
[AC_CHECK_
MEMBERS(struct sockaddr_in6.sin6_len
,
[HAVE_IPV6="yes"; AC_DEFINE(HAVE_IPV6, 1, [])], [
],
[#include <sys/socket.h>
#include <netdb.h>])],
[
])
[AC_CHECK_
TYPE(struct sockaddr_in6
,
[HAVE_IPV6="yes"; AC_DEFINE(HAVE_IPV6, 1)
],
[],
[$ac_includes_default
#include <netinet/in.h>])
])
AC_SUBST(HAVE_IPV6)
AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
...
...
src/backend/libpq/ip.c
View file @
9df2c440
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/ip.c,v 1.
1 2003/01/06 03:18:26 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/ip.c,v 1.
2 2003/01/09 14:35:03 petere
Exp $
*
* This file and the IPV6 implementation were initially provided by
* Nigel Kukard <nkukard@lbsd.net>, Linux Based Systems Design
...
...
@@ -365,7 +365,11 @@ convSockAddr6to4(const SockAddr *src, SockAddr *dst)
dst
->
in
.
sin_family
=
AF_INET
;
dst
->
in
.
sin_port
=
src
->
in6
.
sin6_port
;
dst
->
in
.
sin_addr
.
s_addr
=
src
->
in6
.
sin6_addr
.
s6_addr32
[
3
];
dst
->
in
.
sin_addr
.
s_addr
=
(
src
->
in6
.
sin6_addr
.
s6_addr
[
15
])
+
(
src
->
in6
.
sin6_addr
.
s6_addr
[
14
]
<<
8
)
+
(
src
->
in6
.
sin6_addr
.
s6_addr
[
13
]
<<
16
)
+
(
src
->
in6
.
sin6_addr
.
s6_addr
[
12
]
<<
24
);
SockAddr_ntop
(
src
,
addr_str
,
INET6_ADDRSTRLEN
,
0
);
}
#endif
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