diff --git a/src/osal.h b/src/osal.h index 162060c4..03a054b3 100644 --- a/src/osal.h +++ b/src/osal.h @@ -103,19 +103,23 @@ typedef struct { typedef pthread_mutex_t mdbx_fastmutex_t; #endif /* Platform */ -#ifndef SSIZE_MAX -#define SSIZE_MAX INTPTR_MAX -#endif - -#ifdef HAVE_SYS_STAT_H +/* *INDENT-OFF* */ +/* clang-format off */ +#if defined(HAVE_SYS_STAT_H) || __has_include() #include #endif -#ifdef HAVE_SYS_TYPES_H +#if defined(HAVE_SYS_TYPES_H) || __has_include() #include #endif -#ifdef HAVE_SYS_FILE_H +#if defined(HAVE_SYS_FILE_H) || __has_include() #include #endif +/* *INDENT-ON* */ +/* clang-format on */ + +#ifndef SSIZE_MAX +#define SSIZE_MAX INTPTR_MAX +#endif #if defined(i386) || defined(__386) || defined(__i386) || defined(__i386__) || \ defined(i486) || defined(__i486) || defined(__i486__) || \ diff --git a/test/utils.cc b/test/utils.cc index 25c215b0..20a0ce90 100644 --- a/test/utils.cc +++ b/test/utils.cc @@ -14,7 +14,7 @@ #include "test.h" #include -#ifdef HAVE_IEEE754_H +#if defined(HAVE_IEEE754_H) || __has_include() #include #endif