summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gl/lib/rand-isaac.c2
-rw-r--r--gl/lib/randread.c2
-rw-r--r--src/system.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/gl/lib/rand-isaac.c b/gl/lib/rand-isaac.c
index 5ad9cae01..349bf0e23 100644
--- a/gl/lib/rand-isaac.c
+++ b/gl/lib/rand-isaac.c
@@ -40,7 +40,7 @@
/* If the platform supports unaligned access,
then don't have -fsanitize=undefined warn about it. */
#undef ATTRIBUTE_NO_WARN_SANITIZE_UNDEFINED
-#if !_STRING_ARCH_unaligned \
+#if !(_STRING_ARCH_unaligned || _STRING_INLINE_unaligned) \
|| __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 9)
# define ATTRIBUTE_NO_WARN_SANITIZE_UNDEFINED /* empty */
#else
diff --git a/gl/lib/randread.c b/gl/lib/randread.c
index ff85d5649..2d211a084 100644
--- a/gl/lib/randread.c
+++ b/gl/lib/randread.c
@@ -60,7 +60,7 @@
# define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
-#if _STRING_ARCH_unaligned
+#if _STRING_ARCH_unaligned || _STRING_INLINE_unaligned
# define ALIGNED_POINTER(ptr, type) true
#else
# define ALIGNED_POINTER(ptr, type) ((size_t) (ptr) % alignof (type) == 0)
diff --git a/src/system.h b/src/system.h
index e82dce498..3fa0740c6 100644
--- a/src/system.h
+++ b/src/system.h
@@ -515,7 +515,7 @@ is_nul (void const *buf, size_t length)
to avoid -fsanitize=undefined warnings.
Considering coreutils is mainly concerned with relatively
large buffers, we'll just use the defined behavior. */
-#if 0 && _STRING_ARCH_unaligned
+#if 0 && (_STRING_ARCH_unaligned || _STRING_INLINE_unaligned)
unsigned long word;
#else
unsigned char word;