Skip to content

Commit

Permalink
macro: define __aligned_u64 to handle kernels without such support
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Mar 17, 2021
1 parent b6153ed commit dcf6901
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -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>]])
Expand Down
4 changes: 4 additions & 0 deletions src/lxc/macro.h
Expand Up @@ -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 */

0 comments on commit dcf6901

Please sign in to comment.