mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-03 00:00:07 +03:00
21 lines
595 B
C
21 lines
595 B
C
|
#ifndef _ASM_UNALIGNED_H
|
||
|
#define _ASM_UNALIGNED_H
|
||
|
|
||
|
#if defined(__LITTLE_ENDIAN)
|
||
|
# include <linux/unaligned/le_struct.h>
|
||
|
# include <linux/unaligned/be_byteshift.h>
|
||
|
# include <linux/unaligned/generic.h>
|
||
|
# define get_unaligned __get_unaligned_le
|
||
|
# define put_unaligned __put_unaligned_le
|
||
|
#elif defined(__BIG_ENDIAN)
|
||
|
# include <linux/unaligned/be_struct.h>
|
||
|
# include <linux/unaligned/le_byteshift.h>
|
||
|
# include <linux/unaligned/generic.h>
|
||
|
# define get_unaligned __get_unaligned_be
|
||
|
# define put_unaligned __put_unaligned_be
|
||
|
#else
|
||
|
# error need to define endianess
|
||
|
#endif
|
||
|
|
||
|
#endif /* _ASM_UNALIGNED_H */
|