From e7e059cc0a5e10d42ad7e949e63ebb29a6603b7a Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 16 Nov 2021 00:08:12 +0100 Subject: [PATCH] linux: allow "sys/queue.h" to be used on macOS macOS and other BSD-like systems have header. Fall back to it if bsd/sys/queue.h (provided on Linux by libbsd) is not found. --- components/linux/include/sys/queue.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/linux/include/sys/queue.h b/components/linux/include/sys/queue.h index 9787d9d5f8..34f5a6caa4 100644 --- a/components/linux/include/sys/queue.h +++ b/components/linux/include/sys/queue.h @@ -1 +1,7 @@ -#include "bsd/sys/queue.h" +#if __has_include() +/* On Linux, try using sys/queue.h provided by libbsd-dev */ +#include +#else +/* Fall back to sys/queue.h which may exist e.g. on macOS */ +#include_next +#endif