ClickHouse/src/Common/hasLinuxCapability.h
Robert Schulze 1a0b5f33b3
More consistent use of platform macros
cmake/target.cmake defines macros for the supported platforms, this
commit changes predefined system macros to our own macros.

__linux__ --> OS_LINUX
__APPLE__ --> OS_DARWIN
__FreeBSD__ --> OS_FREEBSD
2022-06-10 10:22:31 +02:00

15 lines
224 B
C++

#pragma once
#if defined(OS_LINUX)
#include <linux/capability.h>
namespace DB
{
/// Check that the current process has Linux capability. Examples: CAP_IPC_LOCK, CAP_NET_ADMIN.
bool hasLinuxCapability(int cap);
}
#endif