From: Christian Brauner Date: Wed, 17 Mar 2021 18:28:26 +0000 (+0100) Subject: macro: define __aligned_u64 to handle kernels without such support X-Git-Tag: lxc-5.0.0~258^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1abf15db2b5fb5126ae1f9221e6e3de3b4e0768;p=thirdparty%2Flxc.git macro: define __aligned_u64 to handle kernels without such support Signed-off-by: Christian Brauner --- diff --git a/configure.ac b/configure.ac index c79d4af0d..9bd625a71 100644 --- a/configure.ac +++ b/configure.ac @@ -641,6 +641,7 @@ AC_HEADER_MAJOR # Check for some syscalls functions AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat gettid memfd_create move_mount open_tree execveat clone3 fsopen fspick fsconfig fsmount, openat2, close_range, statvfs]) +AC_CHECK_TYPES([__aligned_u64], [], [], [[#include ]]) AC_CHECK_TYPES([struct open_how], [], [], [[#include ]]) AC_CHECK_TYPES([struct clone_args], [], [], [[#include ]]) AC_CHECK_MEMBERS([struct clone_args.set_tid],[],[],[[#include ]]) diff --git a/src/lxc/macro.h b/src/lxc/macro.h index a54fe72b3..2873deb17 100644 --- a/src/lxc/macro.h +++ b/src/lxc/macro.h @@ -733,4 +733,8 @@ enum { #define hweight32(w) __const_hweight32(w) #define hweight64(w) __const_hweight64(w) +#ifndef HAVE___ALIGNED_U64 +#define __aligned_u64 __u64 __attribute__((aligned(8))) +#endif + #endif /* __LXC_MACRO_H */