# SDL: cmake: freebsd: Fix -Wformat warning during tests build

**URL:** <https://discourse.libsdl.org/t/sdl-cmake-freebsd-fix-wformat-warning-during-tests-build/37282>\
**Category:** SDL Commits\
**Created:** [June 18, 2022, 2:38pm UTC](https://discourse.libsdl.org/t/sdl-cmake-freebsd-fix-wformat-warning-during-tests-build/37282 "2022-06-18T14:38:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [June 18, 2022, 2:38pm UTC](https://discourse.libsdl.org/t/sdl-cmake-freebsd-fix-wformat-warning-during-tests-build/37282/1 "2022-06-18T14:38:02Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/d51a8f530e39cc34cec623939487f47053462822>
>
> Without using \<inttypes.h\>, SDL\_PRIx64 will expand to llx, but on 64-bit
> FreeBSD… platforms (u)int64\_t is \`(usigned) long\`:
> SDL\_test\_memory.c:261:77: error: format specifies type 'unsigned long long' but the argument has type 'Uint64' (aka 'unsigned long') \[-Werror,-Wformat\]
> 
> This commit updates config\_minimal.h to also assume presence of inttypes.h
> for everything except old MSVC.

```diff
From d51a8f530e39cc34cec623939487f47053462822 Mon Sep 17 00:00:00 2001
From: Alex Richardson <[EMAIL REDACTED]>
Date: Sat, 18 Jun 2022 14:25:11 +0000
Subject: [PATCH] cmake: freebsd: Fix -Wformat warning during tests build

Without using <inttypes.h>, SDL_PRIx64 will expand to llx, but on 64-bit
FreeBSD platforms (u)int64_t is `(usigned) long`:
SDL_test_memory.c:261:77: error: format specifies type 'unsigned long long' but the argument has type 'Uint64' (aka 'unsigned long') [-Werror,-Wformat]

This commit updates config_minimal.h to also assume presence of inttypes.h
for everything except old MSVC.
---
 include/SDL_config_minimal.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/SDL_config_minimal.h b/include/SDL_config_minimal.h
index 4df92f74825..c74fcdb1456 100644
--- a/include/SDL_config_minimal.h
+++ b/include/SDL_config_minimal.h
@@ -49,6 +49,7 @@ typedef unsigned long long uint64_t;
 typedef unsigned long uintptr_t;
 #else
 #define HAVE_STDINT_H 1
+#define HAVE_INTTYPES_H 1
 #endif /* Visual Studio 2008 */
 
 #ifdef __GNUC__

```
