Skip to content

Commit 5089f6c

Browse files
committed
Check for and use <netdb.h> for postmaster.c, instead of checking if
MAXHOSTNAMELEN is defined. For some reason, my 2.5.1 Solaris box at work fails on that check...
1 parent ac994a6 commit 5089f6c

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

src/backend/postmaster/postmaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.46 1997/05/25 15:37:15 scrappy Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.47 1997/07/30 14:03:33 scrappy Exp $
1414
*
1515
* NOTES
1616
*
@@ -34,7 +34,7 @@
3434
*/
3535
/* moved here to prevent double define */
3636
#include <sys/param.h> /* for MAXHOSTNAMELEN on most */
37-
#ifndef MAXHOSTNAMELEN
37+
#ifdef HAVE_NETDB_H
3838
#include <netdb.h> /* for MAXHOSTNAMELEN on some */
3939
#endif
4040

src/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2688,7 +2688,7 @@ else
26882688
fi
26892689
done
26902690

2691-
for ac_hdr in sys/resource.h
2691+
for ac_hdr in sys/resource.h netdb.h
26922692
do
26932693
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
26942694
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6

src/configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ dnl Checks for header files.
376376
AC_HEADER_STDC
377377
AC_HEADER_SYS_WAIT
378378
AC_CHECK_HEADERS(limits.h unistd.h termios.h values.h sys/select.h)
379-
AC_CHECK_HEADERS(sys/resource.h)
379+
AC_CHECK_HEADERS(sys/resource.h netdb.h)
380380
AC_CHECK_HEADERS(readline.h history.h dld.h crypt.h endian.h float.h)
381381

382382
dnl Checks for typedefs, structures, and compiler characteristics.

src/include/config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* The following is set using configure.
1515
*/
1616

17+
/* Set to 1 if you have <netdb.h> */
18+
#undef HAVE_NETDB_H
19+
1720
/* Set to 1 if you have <endian.h> */
1821
#undef HAVE_ENDIAN_H
1922

0 commit comments

Comments
 (0)