Skip to content

Commit a5dba02

Browse files
author
Neil Conway
committed
The call to DNSServiceRegistrationCreate in postmaster.c does incorrect
byte-swapping on the port number which causes the call to fail on Intel Macs. This patch uses htons() instead of htonl() and fixes this bug. Ashley Clark
1 parent b3358e2 commit a5dba02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/postmaster/postmaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.482 2006/03/05 15:58:36 momjian Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.483 2006/03/18 22:09:58 neilc Exp $
4141
*
4242
* NOTES
4343
*
@@ -810,7 +810,7 @@ PostmasterMain(int argc, char *argv[])
810810
DNSServiceRegistrationCreate(bonjour_name,
811811
"_postgresql._tcp.",
812812
"",
813-
htonl(PostPortNumber),
813+
htons(PostPortNumber),
814814
"",
815815
(DNSServiceRegistrationReply) reg_reply,
816816
NULL);

0 commit comments

Comments
 (0)