From 6b950e8666e83f23d48459ed6cb066313b207d3a Mon Sep 17 00:00:00 2001 From: Alexandre Snarskii Date: Mon, 7 Oct 2024 18:32:54 +0300 Subject: [PATCH] cmake: improve net/ethernet.h header detection --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01a17e222..7e9733ab1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -663,7 +663,11 @@ CHECK_C_SOURCE_COMPILES("#include \nvoid main(void) { while(1) ; } vo CHECK_C_SOURCE_COMPILES("#include \nvoid main(void) { while(1) ; } void xxexit(void){}" LWS_HAVE_INTTYPES_H) CHECK_C_SOURCE_COMPILES("#include \nvoid main(void) { while(1) ; } void xxexit(void){}" LWS_HAVE_SYS_RESOURCE_H) CHECK_C_SOURCE_COMPILES("#include \nvoid main(void) { while(1) ; } void xxexit(void){}" LWS_HAVE_LINUX_IPV6_H) -CHECK_C_SOURCE_COMPILES("#include \nvoid main(void) { while(1) ; } void xxexit(void){}" LWS_HAVE_NET_ETHERNET_H) +if (LWS_HAVE_SYS_TYPES_H) + CHECK_C_SOURCE_COMPILES("#include \n#include \n void main(void) { while (1) ; } void xxexit(void){}" LWS_HAVE_NET_ETHERNET_H) +else() + CHECK_C_SOURCE_COMPILES("#include \nvoid main(void) { while(1) ; } void xxexit(void){}" LWS_HAVE_NET_ETHERNET_H) +endif() CHECK_C_SOURCE_COMPILES("#include \nvoid main(void) { while(1) ; } void xxexit(void){}" LWS_HAVE_SYSTEMD_H)