Skip to content

Commit

Permalink
libcrun: fix compile error without libseccomp and libcap
Browse files Browse the repository at this point in the history
Fixed compile error without libseccomp and libcap, running
clang-format to format the code style.

Signed-off-by: Xiangyu Chen <[email protected]>
  • Loading branch information
chenxy1988 authored and giuseppe committed Dec 12, 2023
1 parent 90b21dd commit ea27b13
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/libcrun/container.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
#include "container.h"
#include "utils.h"
#include "seccomp.h"
#include <seccomp.h>
#ifdef HAVE_SECCOMP
# include <seccomp.h>
#endif
#include "scheduler.h"
#include "seccomp_notify.h"
#include "custom-handler.h"
Expand All @@ -47,7 +49,9 @@
#include <sys/signalfd.h>
#include <sys/epoll.h>
#include <sys/socket.h>
#include <sys/capability.h>
#ifdef HAVE_CAP
# include <sys/capability.h>
#endif
#include <sys/ioctl.h>
#include <termios.h>
#include <grp.h>
Expand Down Expand Up @@ -3829,6 +3833,7 @@ populate_array_field (char ***field, char *array[], size_t num_elements)
(*field)[i] = NULL;
}

#ifdef HAVE_CAP
static void
populate_capabilities (struct features_info_s *info, char ***capabilities, size_t *num_capabilities)
{
Expand Down Expand Up @@ -3876,6 +3881,7 @@ populate_capabilities (struct features_info_s *info, char ***capabilities, size_
(*capabilities)[index] = NULL; // Terminate the array with NULL
populate_array_field (&(info->linux.capabilities), *capabilities, *num_capabilities);
}
#endif

static void
retrieve_mount_options (struct features_info_s **info)
Expand Down

0 comments on commit ea27b13

Please sign in to comment.