This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/master by this push:
     new 85981d7  Fixed compilation against Linux 5.9+ capability.h.
85981d7 is described below

commit 85981d7c728798783b2e1e7cbed4f27a1497ccb2
Author: Charles-Francois Natali <[email protected]>
AuthorDate: Sun May 16 20:07:03 2021 +0100

    Fixed compilation against Linux 5.9+ capability.h.
    
    They should be defined without the "CAP_" prefix to avoid clashing with
    the corresponding definitions in `linux/capability.h` - and be
    consistent with other capabilities.
---
 include/mesos/mesos.proto    | 6 +++---
 include/mesos/v1/mesos.proto | 6 +++---
 src/linux/capabilities.cpp   | 6 +++---
 src/linux/capabilities.hpp   | 6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index 3cbdc5c..f153de4 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -3378,9 +3378,9 @@ message CapabilityInfo {
     WAKE_ALARM = 1035;
     BLOCK_SUSPEND = 1036;
     AUDIT_READ = 1037;
-    CAP_PERFMON = 1038;
-    CAP_BPF = 1039;
-    CAP_CHECKPOINT_RESTORE = 1040;
+    PERFMON = 1038;
+    BPF = 1039;
+    CHECKPOINT_RESTORE = 1040;
   }
 
   repeated Capability capabilities = 1;
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index 0a3f8c0..f99cff3 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -3367,9 +3367,9 @@ message CapabilityInfo {
     WAKE_ALARM = 1035;
     BLOCK_SUSPEND = 1036;
     AUDIT_READ = 1037;
-    CAP_PERFMON = 1038;
-    CAP_BPF = 1039;
-    CAP_CHECKPOINT_RESTORE = 1040;
+    PERFMON = 1038;
+    BPF = 1039;
+    CHECKPOINT_RESTORE = 1040;
   }
 
   repeated Capability capabilities = 1;
diff --git a/src/linux/capabilities.cpp b/src/linux/capabilities.cpp
index b161e64..41bf811 100644
--- a/src/linux/capabilities.cpp
+++ b/src/linux/capabilities.cpp
@@ -494,9 +494,9 @@ ostream& operator<<(ostream& stream, const Capability& 
capability)
     case WAKE_ALARM:              return stream << "WAKE_ALARM";
     case BLOCK_SUSPEND:           return stream << "BLOCK_SUSPEND";
     case AUDIT_READ:              return stream << "AUDIT_READ";
-    case CAP_PERFMON:             return stream << "CAP_PERFMON";
-    case CAP_BPF:                 return stream << "CAP_BPF";
-    case CAP_CHECKPOINT_RESTORE:  return stream << "CAP_CHECKPOINT_RESTORE";
+    case PERFMON:                 return stream << "PERFMON";
+    case BPF:                     return stream << "BPF";
+    case CHECKPOINT_RESTORE:      return stream << "CHECKPOINT_RESTORE";
     case MAX_CAPABILITY:          UNREACHABLE();
   }
 
diff --git a/src/linux/capabilities.hpp b/src/linux/capabilities.hpp
index 4f41f49..6e11e4d 100644
--- a/src/linux/capabilities.hpp
+++ b/src/linux/capabilities.hpp
@@ -72,9 +72,9 @@ enum Capability : int
   WAKE_ALARM             = 35,
   BLOCK_SUSPEND          = 36,
   AUDIT_READ             = 37,
-  CAP_PERFMON            = 38,
-  CAP_BPF                = 39,
-  CAP_CHECKPOINT_RESTORE = 40,
+  PERFMON                = 38,
+  BPF                    = 39,
+  CHECKPOINT_RESTORE     = 40,
   MAX_CAPABILITY         = 41,
 };
 

Reply via email to