summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/auth/auth_mschap_v1.c2
-rw-r--r--accel-pppd/auth/auth_mschap_v2.c2
-rw-r--r--accel-pppd/ctrl/ipoe/dhcpv4.c2
-rw-r--r--accel-pppd/extra/chap-secrets.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/accel-pppd/auth/auth_mschap_v1.c b/accel-pppd/auth/auth_mschap_v1.c
index d00e1a7..a55082e 100644
--- a/accel-pppd/auth/auth_mschap_v1.c
+++ b/accel-pppd/auth/auth_mschap_v1.c
@@ -406,7 +406,7 @@ static void des_encrypt(const uint8_t *input, const uint8_t *key, uint8_t *outpu
DES_key_schedule ks;
memcpy(p_key.buf, key, 7);
- p_key.u64 = bswap_64(p_key.u64);
+ p_key.u64 = be64toh(p_key.u64);
for (i = 0; i < 8; i++) {
cb[i] = (((p_key.u64 << (7 * i)) >> 56) & 0xfe);
diff --git a/accel-pppd/auth/auth_mschap_v2.c b/accel-pppd/auth/auth_mschap_v2.c
index 1c8e444..635cb28 100644
--- a/accel-pppd/auth/auth_mschap_v2.c
+++ b/accel-pppd/auth/auth_mschap_v2.c
@@ -488,7 +488,7 @@ static void des_encrypt(const uint8_t *input, const uint8_t *key, uint8_t *outpu
DES_key_schedule ks;
memcpy(p_key.buf,key,7);
- p_key.u64=bswap_64(p_key.u64);
+ p_key.u64 = be64toh(p_key.u64);
for(i=0;i<8;i++)
{
diff --git a/accel-pppd/ctrl/ipoe/dhcpv4.c b/accel-pppd/ctrl/ipoe/dhcpv4.c
index cdb21a9..8f536ca 100644
--- a/accel-pppd/ctrl/ipoe/dhcpv4.c
+++ b/accel-pppd/ctrl/ipoe/dhcpv4.c
@@ -574,7 +574,7 @@ static uint16_t ip_csum(uint16_t *buf, int len)
sum += *buf++;
if (len & 1) {
-#ifdef __LITTLE_ENDIAN
+#if __BYTE_ORDER == __LITTLE_ENDIAN
sum += *(uint8_t *)buf;
#else
sum += *(uint8_t *)buf << 8;
diff --git a/accel-pppd/extra/chap-secrets.c b/accel-pppd/extra/chap-secrets.c
index 0fadc9c..849ceef 100644
--- a/accel-pppd/extra/chap-secrets.c
+++ b/accel-pppd/extra/chap-secrets.c
@@ -363,7 +363,7 @@ static void des_encrypt(const uint8_t *input, const uint8_t *key, uint8_t *outpu
DES_key_schedule ks;
memcpy(p_key.buf, key, 7);
- p_key.u64 = bswap_64(p_key.u64);
+ p_key.u64 = be64toh(p_key.u64);
for (i = 0; i < 8; i++) {
cb[i] = (((p_key.u64 << (7 * i)) >> 56) & 0xfe);