Fix for systems without beXXtoh
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
#define P_PACKET_ID_ARRAY_LEN_OFFSET(hmac_size) (P_HARD_RESET_PACKET_ID_OFFSET(hmac_size) + 8)
|
||||
|
||||
static inline u_int32_t get_packet_id(const u_int8_t * payload, u_int8_t hms) {
|
||||
return be32toh(*(u_int32_t*)(payload + P_HARD_RESET_PACKET_ID_OFFSET(hms)));
|
||||
return ntohl(*(u_int32_t*)(payload + P_HARD_RESET_PACKET_ID_OFFSET(hms)));
|
||||
}
|
||||
|
||||
static inline int8_t check_pkid_and_detect_hmac_size(const u_int8_t * payload) {
|
||||
|
||||
Reference in New Issue
Block a user