]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
macro: define __aligned_u64 to handle kernels without such support
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 17 Mar 2021 18:28:26 +0000 (19:28 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 17 Mar 2021 21:16:51 +0000 (22:16 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
configure.ac
src/lxc/macro.h

index 5f0fb6d11a8a890c8587c98c02edb545536d277c..dd71470a6f41108315f9b5a8863e137e268800fd 100644 (file)
@@ -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 <linux/types.h>]])
 AC_CHECK_TYPES([struct open_how], [], [], [[#include <linux/openat2.h>]])
 AC_CHECK_TYPES([struct clone_args], [], [], [[#include <linux/sched.h>]])
 AC_CHECK_MEMBERS([struct clone_args.set_tid],[],[],[[#include <linux/sched.h>]])
index a54fe72b3a2add84eb841f5963b9df11e07c97ce..2873deb174756d30e12d597688e66f12880cb5a2 100644 (file)
@@ -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 */