From 5d12dfa8eaf1a40fea8f7c95c7efb0529aef1f8b Mon Sep 17 00:00:00 2001 From: Fedor Lapshin Date: Mon, 4 Mar 2024 22:10:14 +0300 Subject: [PATCH] options/internal: remove endian.h include --- options/ansi/include/bits/ansi/timespec.h | 1 - options/internal/include/bits/field-padding.h | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/options/ansi/include/bits/ansi/timespec.h b/options/ansi/include/bits/ansi/timespec.h index cb0dfcf6ce..70d06eebe1 100644 --- a/options/ansi/include/bits/ansi/timespec.h +++ b/options/ansi/include/bits/ansi/timespec.h @@ -4,7 +4,6 @@ #include #include -#include struct timespec { time_t tv_sec; diff --git a/options/internal/include/bits/field-padding.h b/options/internal/include/bits/field-padding.h index d58257ff47..441984588c 100644 --- a/options/internal/include/bits/field-padding.h +++ b/options/internal/include/bits/field-padding.h @@ -1,11 +1,15 @@ #ifndef MLIBC_FIELD_PADDING_H #define MLIBC_FIELD_PADDING_H -#include +#ifdef __GNUC__ #define __MLIBC_FIELD_PADDED(T, F, PT) \ - PT : (sizeof(PT)-sizeof(T))*8*(BYTE_ORDER == BIG_ENDIAN); \ + PT : (sizeof(PT)-sizeof(T))*8*(__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__); \ T F; \ - PT : (sizeof(PT)-sizeof(T))*8*(BYTE_ORDER == LITTLE_ENDIAN) + PT : (sizeof(PT)-sizeof(T))*8*(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) + +#else +#error "Unsupported compiler" +#endif #endif