json: Define PRId64 and PRIu64 on FreeBSD

On FreeBSD, these types are long instead of long long.
This commit is contained in:
Mateusz Piotrowski 2023-06-22 16:21:09 +00:00 committed by Geoff Amey
parent 95d6d8d32f
commit 91d6b61268
1 changed files with 5 additions and 0 deletions

View File

@ -17,9 +17,14 @@
/* Formats for int64_t and uint64_t */ /* Formats for int64_t and uint64_t */
#ifndef PRId64 #ifndef PRId64
#ifdef __FreeBSD__
#define PRId64 "ld" /* %D, int64_t */
#define PRIu64 "lu" /* %U, uint64_t */
#else /* Linux */
#define PRId64 "lld" /* %D, int64_t */ #define PRId64 "lld" /* %D, int64_t */
#define PRIu64 "llu" /* %U, uint64_t */ #define PRIu64 "llu" /* %U, uint64_t */
#endif #endif
#endif
/* literal key length maximum */ /* literal key length maximum */
#define KEYLEN 255 #define KEYLEN 255