summaryrefslogtreecommitdiff
path: root/src/backend/tcop/fastpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/tcop/fastpath.c')
-rw-r--r--src/backend/tcop/fastpath.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/tcop/fastpath.c b/src/backend/tcop/fastpath.c
index 9207d76981a..8101ae74e0b 100644
--- a/src/backend/tcop/fastpath.c
+++ b/src/backend/tcop/fastpath.c
@@ -17,9 +17,6 @@
*/
#include "postgres.h"
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
#include "access/htup_details.h"
#include "access/xact.h"
#include "catalog/objectaccess.h"
@@ -28,6 +25,7 @@
#include "libpq/pqformat.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
+#include "port/pg_bswap.h"
#include "tcop/fastpath.h"
#include "tcop/tcopprot.h"
#include "utils/acl.h"
@@ -92,7 +90,7 @@ GetOldFunctionMessage(StringInfo buf)
if (pq_getbytes((char *) &ibuf, 4))
return EOF;
appendBinaryStringInfo(buf, (char *) &ibuf, 4);
- nargs = ntohl(ibuf);
+ nargs = pg_ntoh32(ibuf);
/* For each argument ... */
while (nargs-- > 0)
{
@@ -102,7 +100,7 @@ GetOldFunctionMessage(StringInfo buf)
if (pq_getbytes((char *) &ibuf, 4))
return EOF;
appendBinaryStringInfo(buf, (char *) &ibuf, 4);
- argsize = ntohl(ibuf);
+ argsize = pg_ntoh32(ibuf);
if (argsize < -1)
{
/* FATAL here since no hope of regaining message sync */