From 44d9d55c6d0e3a1e26427662d30f350a80282634 Mon Sep 17 00:00:00 2001 From: Gerald Pfeifer Date: Fri, 5 Nov 2021 12:56:07 +0100 Subject: [PATCH] include: Allow for our md5.h to defer to the system header This came up in the context of libsanitizer, where platform-specific support for FreeBSD relies on aspects provided by FreeBSD's own md5.h. Address this by allowing GCC's md5.h to pull in the system header instead, controlled by a new macro USE_SYSTEM_MD5. 2021-11-05 Gerald Pfeifer Jakub Jelinek include/ * md5.h (USE_SYSTEM_MD5): Introduce. --- include/md5.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/md5.h b/include/md5.h index 03f7d29afc7..c5bb6076969 100644 --- a/include/md5.h +++ b/include/md5.h @@ -21,6 +21,10 @@ #ifndef _MD5_H #define _MD5_H 1 +#ifdef USE_SYSTEM_MD5 +#include_next +#else + #include #if defined HAVE_LIMITS_H || _LIBC @@ -151,4 +155,6 @@ extern void *md5_buffer (const char *buffer, size_t len, void *resblock); } #endif +#endif // USE_SYSTEM_MD5 + #endif