Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d46c3fd authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Remove obsolete <linux/capabilities.h> workarounds.

We've updated the glibc header (and musl will just use the bionic uapi
headers), so this is obsolete (and getting in the way of someone trying
to use the PERFMON capability).

Test: treehugger
Change-Id: Ife7ee076179e1db6246738aa41c2b82bd8546265
parent aadb2046
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -66,18 +66,12 @@ static const std::map<std::string, int> cap_map = {
        CAP_MAP_ENTRY(WAKE_ALARM),
        CAP_MAP_ENTRY(WAKE_ALARM),
        CAP_MAP_ENTRY(BLOCK_SUSPEND),
        CAP_MAP_ENTRY(BLOCK_SUSPEND),
        CAP_MAP_ENTRY(AUDIT_READ),
        CAP_MAP_ENTRY(AUDIT_READ),
#if defined(__BIONIC__)
        CAP_MAP_ENTRY(PERFMON),
        CAP_MAP_ENTRY(PERFMON),
        CAP_MAP_ENTRY(BPF),
        CAP_MAP_ENTRY(BPF),
        CAP_MAP_ENTRY(CHECKPOINT_RESTORE),
        CAP_MAP_ENTRY(CHECKPOINT_RESTORE),
#endif
};
};


#if defined(__BIONIC__)
static_assert(CAP_LAST_CAP == CAP_CHECKPOINT_RESTORE, "CAP_LAST_CAP is not CAP_CHECKPOINT_RESTORE");
static_assert(CAP_LAST_CAP == CAP_CHECKPOINT_RESTORE, "CAP_LAST_CAP is not CAP_CHECKPOINT_RESTORE");
#else
static_assert(CAP_LAST_CAP == CAP_AUDIT_READ, "CAP_LAST_CAP is not CAP_AUDIT_READ");
#endif


static bool ComputeCapAmbientSupported() {
static bool ComputeCapAmbientSupported() {
#if defined(__ANDROID__)
#if defined(__ANDROID__)
+0 −11
Original line number Original line Diff line number Diff line
@@ -21,17 +21,6 @@
#include <string>
#include <string>
#include <type_traits>
#include <type_traits>


#if !defined(__ANDROID__)
#ifndef CAP_BLOCK_SUSPEND
#define CAP_BLOCK_SUSPEND 36
#endif
#ifndef CAP_AUDIT_READ
#define CAP_AUDIT_READ 37
#endif
#undef CAP_LAST_CAP
#define CAP_LAST_CAP CAP_AUDIT_READ
#endif

namespace android {
namespace android {
namespace init {
namespace init {