mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-11-27 11:06:37 +06:00
Fix AVR compilation of FNV by using standard integer typenames. (#17716)
This commit is contained in:
parent
59c7b15b4d
commit
1cdde7ba6a
|
@ -76,7 +76,8 @@
|
||||||
#if !defined(__FNV_H__)
|
#if !defined(__FNV_H__)
|
||||||
#define __FNV_H__
|
#define __FNV_H__
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#define FNV_VERSION "5.0.2" /* @(#) FNV Version */
|
#define FNV_VERSION "5.0.2" /* @(#) FNV Version */
|
||||||
|
|
||||||
|
@ -84,7 +85,7 @@
|
||||||
/*
|
/*
|
||||||
* 32 bit FNV-0 hash type
|
* 32 bit FNV-0 hash type
|
||||||
*/
|
*/
|
||||||
typedef u_int32_t Fnv32_t;
|
typedef uint32_t Fnv32_t;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -122,10 +123,10 @@ typedef u_int32_t Fnv32_t;
|
||||||
* 64 bit FNV-0 hash
|
* 64 bit FNV-0 hash
|
||||||
*/
|
*/
|
||||||
#if defined(HAVE_64BIT_LONG_LONG)
|
#if defined(HAVE_64BIT_LONG_LONG)
|
||||||
typedef u_int64_t Fnv64_t;
|
typedef uint64_t Fnv64_t;
|
||||||
#else /* HAVE_64BIT_LONG_LONG */
|
#else /* HAVE_64BIT_LONG_LONG */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u_int32_t w32[2]; /* w32[0] is low order, w32[1] is high order word */
|
uint32_t w32[2]; /* w32[0] is low order, w32[1] is high order word */
|
||||||
} Fnv64_t;
|
} Fnv64_t;
|
||||||
#endif /* HAVE_64BIT_LONG_LONG */
|
#endif /* HAVE_64BIT_LONG_LONG */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user