summaryrefslogtreecommitdiff
path: root/src/common/scram-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/scram-common.c')
-rw-r--r--src/common/scram-common.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/common/scram-common.c b/src/common/scram-common.c
index e43d035d4da..e54fe1a7c98 100644
--- a/src/common/scram-common.c
+++ b/src/common/scram-common.c
@@ -19,12 +19,9 @@
#include "postgres_fe.h"
#endif
-/* for htonl */
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
#include "common/base64.h"
#include "common/scram-common.h"
+#include "port/pg_bswap.h"
#define HMAC_IPAD 0x36
#define HMAC_OPAD 0x5C
@@ -109,7 +106,7 @@ scram_SaltedPassword(const char *password,
uint8 *result)
{
int password_len = strlen(password);
- uint32 one = htonl(1);
+ uint32 one = pg_hton32(1);
int i,
j;
uint8 Ui[SCRAM_KEY_LEN];