diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/lib/tng_io.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index b6fd655..18cf32f 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -1,5 +1,9 @@ add_library(tng_io SHARED tng_io.c md5.c) +if(HAVE_INTTYPES_H) + set_target_properties(tng_io PROPERTIES COMPILE_DEFINITIONS USE_STD_INTTYPES_H=1) +endif() + if(ZLIB_FOUND) set_target_properties(tng_io PROPERTIES COMPILE_DEFINITIONS USE_ZLIB=1) target_link_libraries(tng_io ${ZLIB_LIBRARIES}) diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index 5971c30..82568e9 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -13,7 +13,10 @@ * of the License, or (at your option) any later version. */ +#ifdef USE_STD_INTTYPES_H #include <inttypes.h> +#endif + #include <limits.h> #include <stdlib.h> #include <string.h> |