From 8781812ecec7bbc6628c22afa2fa3f2e06a7ac7f Mon Sep 17 00:00:00 2001 From: Ilya Mashchenko Date: Tue, 22 Oct 2024 22:47:00 +0300 Subject: [PATCH] fix(packaging): check for sys/capability.h only on Linux (#18849) --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7940388a01fdb6..d88091391506ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -339,7 +339,6 @@ check_include_file("sys/mount.h" HAVE_SYS_MOUNT_H) check_include_file("sys/statvfs.h" HAVE_SYS_STATVFS_H) check_include_file("inttypes.h" HAVE_INTTYPES_H) check_include_file("stdint.h" HAVE_STDINT_H) -check_include_file("sys/capability.h" HAVE_SYS_CAPABILITY_H) check_include_file("arpa/inet.h" HAVE_ARPA_INET_H) check_include_file("netinet/tcp.h" HAVE_NETINET_TCP_H) check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H) @@ -354,6 +353,9 @@ check_include_file("sys/socket.h" HAVE_SYS_SOCKET_H) check_include_file("sys/wait.h" HAVE_SYS_WAIT_H) check_include_file("sys/un.h" HAVE_SYS_UN_H) check_include_file("spawn.h" HAVE_SPAWN_H) +if(OS_LINUX) + check_include_file("sys/capability.h" HAVE_SYS_CAPABILITY_H) +endif() # # check symbols