diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | acconfig.h | 1 | ||||
-rw-r--r-- | bsd-rresvport.c | 2 | ||||
-rw-r--r-- | bsd-rresvport.h | 2 | ||||
-rw-r--r-- | configure.in | 15 | ||||
-rw-r--r-- | defines.h | 5 |
6 files changed, 28 insertions, 2 deletions
@@ -1,3 +1,8 @@ | |||
1 | 20000623 | ||
2 | - (djm) Use sa_family_t in prototype for rresvport_af. Patch from | ||
3 | Svante Signell <svante.signell@telia.com> | ||
4 | - (djm) Autoconf logic to define sa_family_t if it is missing | ||
5 | |||
1 | 20000622 | 6 | 20000622 |
2 | - (djm) Automatically generate host key during "make install". Suggested | 7 | - (djm) Automatically generate host key during "make install". Suggested |
3 | by Gary E. Miller <gem@rellim.com> | 8 | by Gary E. Miller <gem@rellim.com> |
diff --git a/acconfig.h b/acconfig.h index 6e92e962a..9b8c3f234 100644 --- a/acconfig.h +++ b/acconfig.h | |||
@@ -158,6 +158,7 @@ | |||
158 | #undef HAVE_SSIZE_T | 158 | #undef HAVE_SSIZE_T |
159 | #undef HAVE_MODE_T | 159 | #undef HAVE_MODE_T |
160 | #undef HAVE_PID_T | 160 | #undef HAVE_PID_T |
161 | #undef HAVE_SA_FAMILY_T | ||
161 | #undef HAVE_STRUCT_SOCKADDR_STORAGE | 162 | #undef HAVE_STRUCT_SOCKADDR_STORAGE |
162 | #undef HAVE_STRUCT_ADDRINFO | 163 | #undef HAVE_STRUCT_ADDRINFO |
163 | #undef HAVE_STRUCT_IN6_ADDR | 164 | #undef HAVE_STRUCT_IN6_ADDR |
diff --git a/bsd-rresvport.c b/bsd-rresvport.c index 99c150e06..fa4af183f 100644 --- a/bsd-rresvport.c +++ b/bsd-rresvport.c | |||
@@ -55,7 +55,7 @@ rresvport(alport) | |||
55 | int | 55 | int |
56 | rresvport_af(alport, af) | 56 | rresvport_af(alport, af) |
57 | int *alport; | 57 | int *alport; |
58 | int af; | 58 | sa_family_t af; |
59 | { | 59 | { |
60 | struct sockaddr_storage ss; | 60 | struct sockaddr_storage ss; |
61 | struct sockaddr *sa; | 61 | struct sockaddr *sa; |
diff --git a/bsd-rresvport.h b/bsd-rresvport.h index 69d6bbd9f..d139895e8 100644 --- a/bsd-rresvport.h +++ b/bsd-rresvport.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include "config.h" | 4 | #include "config.h" |
5 | 5 | ||
6 | #ifndef HAVE_RRESVPORT_AF | 6 | #ifndef HAVE_RRESVPORT_AF |
7 | int rresvport_af(int *alport, int af); | 7 | int rresvport_af(int *alport, sa_family_t af); |
8 | #endif /* !HAVE_RRESVPORT_AF */ | 8 | #endif /* !HAVE_RRESVPORT_AF */ |
9 | 9 | ||
10 | #endif /* _BSD_RRESVPORT_H */ | 10 | #endif /* _BSD_RRESVPORT_H */ |
diff --git a/configure.in b/configure.in index 2ae0d21c6..d9a87d8e6 100644 --- a/configure.in +++ b/configure.in | |||
@@ -502,6 +502,21 @@ if test "x$ac_cv_have_ssize_t" = "xyes" ; then | |||
502 | AC_DEFINE(HAVE_SSIZE_T) | 502 | AC_DEFINE(HAVE_SSIZE_T) |
503 | fi | 503 | fi |
504 | 504 | ||
505 | AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [ | ||
506 | AC_TRY_COMPILE( | ||
507 | [ | ||
508 | #include <sys/types.h> | ||
509 | #include <sys/socket.h> | ||
510 | ], | ||
511 | [ sa_family_t foo; foo = 1235; ], | ||
512 | [ ac_cv_have_sa_family_t="yes" ], | ||
513 | [ ac_cv_have_sa_family_t="no" ] | ||
514 | ) | ||
515 | ]) | ||
516 | if test "x$ac_cv_have_sa_family_t" = "xyes" ; then | ||
517 | AC_DEFINE(HAVE_SA_FAMILY_T) | ||
518 | fi | ||
519 | |||
505 | AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [ | 520 | AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [ |
506 | AC_TRY_COMPILE( | 521 | AC_TRY_COMPILE( |
507 | [ | 522 | [ |
@@ -187,6 +187,11 @@ typedef int ssize_t; | |||
187 | # define HAVE_SSIZE_T | 187 | # define HAVE_SSIZE_T |
188 | #endif /* HAVE_SSIZE_T */ | 188 | #endif /* HAVE_SSIZE_T */ |
189 | 189 | ||
190 | #ifndef HAVE_SA_FAMILY_T | ||
191 | typedef int sa_family_t; | ||
192 | # define HAVE_SA_FAMILY_T | ||
193 | #endif /* HAVE_SA_FAMILY_T */ | ||
194 | |||
190 | #ifndef HAVE_PID_T | 195 | #ifndef HAVE_PID_T |
191 | typedef int pid_t; | 196 | typedef int pid_t; |
192 | # define HAVE_PID_T | 197 | # define HAVE_PID_T |