From bf410c84f15471ede2bd6c6cab63f879d5e4e6a0 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Sun, 1 Sep 2019 17:25:58 +0200 Subject: [PATCH] pkg/libb2: define HAVE_ALIGNED_ACCESS_REQUIRED based on CPU Most architectures do not support unaligned memory access, so set the define accordingly. --- pkg/libb2/include/config.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/libb2/include/config.h b/pkg/libb2/include/config.h index 55cc6a0e8e..75e6d3aeb4 100644 --- a/pkg/libb2/include/config.h +++ b/pkg/libb2/include/config.h @@ -1,6 +1,8 @@ #ifndef CONFIG_H #define CONFIG_H +#include "cpu.h" + #ifdef __cplusplus extern "C" { #endif @@ -13,6 +15,10 @@ extern "C" { #define NATIVE_LITTLE_ENDIAN #endif +#ifndef CPU_HAS_UNALIGNED_ACCESS +#define HAVE_ALIGNED_ACCESS_REQUIRED +#endif + #ifdef __cplusplus } #endif