diff --git a/Makefile b/Makefile
index 4e45f93b..200f86f1 100644
--- a/Makefile
+++ b/Makefile
@@ -241,6 +241,7 @@ LDLIBS=
 #	functions like 'link' or variables like 'tzname' required by POSIX
 #  -DHAVE_SETENV=0 if your system lacks the setenv function
 #  -DHAVE_SNPRINTF=0 if your system lacks the snprintf function+
+#  -DHAVE_STDALIGN_H=0 if <stdalign.h> does not work*%
 #  -DHAVE_STDCKDINT_H=0 if neither <stdckdint.h> nor substitutes like
 #	__builtin_add_overflow work*
 #  -DHAVE_STDINT_H=0 if <stdint.h> does not work*+
@@ -303,6 +304,8 @@ LDLIBS=
 # * Options marked "*" can be omitted if your compiler is C23 compatible.
 # * Options marked "+" are obsolescent and are planned to be removed
 #   once the code assumes C99 or later, say in the year 2029.
+# * Options marked "%" are obsolescent and are planned to be removed
+#   once the code assumes C11 or later, say in the year 2041.
 #
 # Select instrumentation via "make GCC_INSTRUMENT='whatever'".
 GCC_INSTRUMENT = \
diff --git a/zic.c b/zic.c
index b260851f..0bb62add 100644
--- a/zic.c
+++ b/zic.c
@@ -70,10 +70,23 @@ enum { FORMAT_LEN_GROWTH_BOUND = 5 };
 /* The minimum alignment of a type, for pre-C23 platforms.
    The __SUNPRO_C test is because Oracle Developer Studio 12.6 lacks
    <stdalign.h> even though __STDC_VERSION__ == 201112.  */
-#if __STDC_VERSION__ < 201112 || defined __SUNPRO_C
-# define alignof(type) offsetof(struct { char a; type b; }, b)
-#elif __STDC_VERSION__ < 202311
-# include <stdalign.h>
+#if __STDC_VERSION__ < 202311
+# if !defined HAS_STDALIGN_H && defined __has_include
+#  if __has_include(<stdalign.h>)
+#   define HAS_STDALIGN_H 1
+#  endif
+# endif
+# if !defined HAS_STDALIGN_H && defined __SUNPRO_C
+#  define HAS_STDALIGN_H 0
+# endif
+# ifndef HAS_STDALIGN_H
+#  define HAS_STDALIGN_H (201112 <= __STDC_VERSION__)
+# endif
+# if HAS_STDALIGN_H
+#  include <stdalign.h>
+# else
+#  define alignof(type) offsetof(struct { char a; type b; }, b)
+# endif
 #endif
 
 /* The maximum length of a text line, including the trailing newline.  */
