pkg/libb2: define HAVE_ALIGNED_ACCESS_REQUIRED based on CPU

Most architectures do not support unaligned memory access, so set the define accordingly.
This commit is contained in:
Benjamin Valentin 2019-09-01 17:25:58 +02:00 committed by Benjamin Valentin
parent 7047a200af
commit bf410c84f1

View File

@ -1,6 +1,8 @@
#ifndef CONFIG_H #ifndef CONFIG_H
#define CONFIG_H #define CONFIG_H
#include "cpu.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -13,6 +15,10 @@ extern "C" {
#define NATIVE_LITTLE_ENDIAN #define NATIVE_LITTLE_ENDIAN
#endif #endif
#ifndef CPU_HAS_UNALIGNED_ACCESS
#define HAVE_ALIGNED_ACCESS_REQUIRED
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif