diff --git a/bcm/bcm.c b/bcm/bcm.c
index e475dd053150d61b847ded16d2f6253da281c23d..3e410fc6121fd045080a9d9f039537f39a57c450 100644
--- a/bcm/bcm.c
+++ b/bcm/bcm.c
@@ -222,14 +222,14 @@ int bcm_eth_reset_phy(const char *name, int phy_id)
 
 static int bcm_eth_get_stats_from_proc(const char *ifname, struct eth_stats *s)
 {
-	unsigned long rx_bytes, rx_packets, rx_err, rx_drop;
-	unsigned long rx_fifo, rx_frame, rx_comp, rx_multi;
-	unsigned long tx_bytes, tx_packets, tx_err, tx_drop;
-	unsigned long tx_fifo, tx_coll, tx_carr, tx_comp;
-	unsigned long tx_mcast_packets = 0, rx_mcast_bytes = 0, tx_mcast_bytes = 0;
-	unsigned long rx_ucast_packets = 0, tx_ucast_packets = 0;
-	unsigned long rx_bcast_packets = 0, tx_bcast_packets = 0;
-	unsigned long rx_err_unknown = 0;
+	uint64_t rx_bytes, rx_packets, rx_err, rx_drop;
+	uint64_t rx_fifo, rx_frame, rx_comp, rx_multi;
+	uint64_t tx_bytes, tx_packets, tx_err, tx_drop;
+	uint64_t tx_fifo, tx_coll, tx_carr, tx_comp;
+	uint64_t tx_mcast_packets = 0, rx_mcast_bytes = 0, tx_mcast_bytes = 0;
+	uint64_t rx_ucast_packets = 0, tx_ucast_packets = 0;
+	uint64_t rx_bcast_packets = 0, tx_bcast_packets = 0;
+	uint64_t rx_err_unknown = 0;
 	char cmdbuf[512] = {0};
 	char *ptr;
 	int ret;
@@ -243,8 +243,14 @@ static int bcm_eth_get_stats_from_proc(const char *ifname, struct eth_stats *s)
 
 	ptr = cmdbuf + strlen(ifname) + strlen(":");
 	ret = sscanf(ptr,
-		" %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu"
-		" %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu",
+		" %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64
+		" %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64
+		" %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64
+		" %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64
+		" %" SCNu64 " %" SCNu64 " %" SCNu64
+		" %" SCNu64 " %" SCNu64
+		" %" SCNu64 " %" SCNu64
+		" %" SCNu64,
 		&rx_bytes, &rx_packets, &rx_err, &rx_drop,
 		&rx_fifo, &rx_frame, &rx_comp, &rx_multi,
 		&tx_bytes, &tx_packets, &tx_err, &tx_drop,
diff --git a/ethernet.h b/ethernet.h
index 0116428d247bb8f903930ec083abe8f922f6d5b7..540aa0a734f44aa248e10c8deab70aa130eff5e7 100644
--- a/ethernet.h
+++ b/ethernet.h
@@ -109,21 +109,21 @@ enum eth_callstatus {
 };
 
 struct eth_stats {
-	unsigned long tx_bytes;
-	unsigned long rx_bytes;
-	unsigned long tx_packets;
-	unsigned long rx_packets;
-	uint32_t tx_errors;                 /* error packets */
-	uint32_t rx_errors;
-	unsigned long tx_ucast_packets;     /* unicast packets */
-	unsigned long rx_ucast_packets;
-	unsigned long tx_mcast_packets;     /* multicast packets */
-	unsigned long rx_mcast_packets;
-	unsigned long tx_bcast_packets;     /* broadcast packets */
-	unsigned long rx_bcast_packets;
-	uint32_t tx_discard_packets;        /* no error packets dropped */
-	uint32_t rx_discard_packets;        /* no error packets dropped */
-	uint32_t rx_unknown_packets;        /* unknown protocol packets */
+	uint64_t tx_bytes;
+	uint64_t rx_bytes;
+	uint64_t tx_packets;
+	uint64_t rx_packets;
+	uint64_t tx_errors;                 /* error packets */
+	uint64_t rx_errors;
+	uint64_t tx_ucast_packets;     /* unicast packets */
+	uint64_t rx_ucast_packets;
+	uint64_t tx_mcast_packets;     /* multicast packets */
+	uint64_t rx_mcast_packets;
+	uint64_t tx_bcast_packets;     /* broadcast packets */
+	uint64_t rx_bcast_packets;
+	uint64_t tx_discard_packets;        /* no error packets dropped */
+	uint64_t rx_discard_packets;        /* no error packets dropped */
+	uint64_t rx_unknown_packets;        /* unknown protocol packets */
 };
 
 /* struct eth_vlan - vlan over eth_link */