Skip to content

Commit

Permalink
Fix build without libcap
Browse files Browse the repository at this point in the history
The work to support features introduced another point of dependency on
libcap that previously wasn't guarded by ifdefs

Refs: containers#1237
Signed-off-by: Robert Günzler <[email protected]>
  • Loading branch information
robertgzr committed Nov 9, 2023
1 parent 174bee1 commit 767ba88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libcrun/container.c
Original file line number Diff line number Diff line change
Expand Up @@ -3925,8 +3925,10 @@ libcrun_container_get_features (libcrun_context_t *context, struct features_info
// Populate namespaces
populate_array_field (&((*info)->linux.namespaces), namespaces, num_namspaces);

#ifdef HAVE_CAP
// Populate capabilities
populate_capabilities (*info, &capabilities, &num_capabilities);
#endif

// Hardcode the values for cgroup
(*info)->linux.cgroup.v1 = true;
Expand Down

0 comments on commit 767ba88

Please sign in to comment.