From ab6762b849ce915141d8df11744840556bbfcf51 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Fri, 15 Apr 2022 21:43:45 +0200 Subject: [PATCH] Fix possible missing uchar.h. --- configure.ac | 2 +- lib/crypto_backend/crypto_backend.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b052f8cf..d31fb0a7 100644 --- a/configure.ac +++ b/configure.ac @@ -57,7 +57,7 @@ dnl ========================================================================== AC_C_RESTRICT AC_HEADER_DIRENT -AC_CHECK_HEADERS(fcntl.h malloc.h inttypes.h sys/ioctl.h sys/mman.h \ +AC_CHECK_HEADERS(fcntl.h malloc.h inttypes.h uchar.h sys/ioctl.h sys/mman.h \ sys/sysmacros.h sys/statvfs.h ctype.h unistd.h locale.h byteswap.h endian.h stdint.h) AC_CHECK_DECLS([O_CLOEXEC],,[AC_DEFINE([O_CLOEXEC],[0], [Defined to 0 if not provided])], [[ diff --git a/lib/crypto_backend/crypto_backend.h b/lib/crypto_backend/crypto_backend.h index 39e98198..af751e10 100644 --- a/lib/crypto_backend/crypto_backend.h +++ b/lib/crypto_backend/crypto_backend.h @@ -25,7 +25,12 @@ #include #include #include +#ifdef HAVE_UCHAR_H #include +#else +#define char32_t uint32_t +#define char16_t uint16_t +#endif struct crypt_hash; struct crypt_hmac;