diff --git a/src/include/c.h b/src/include/c.h
index 852551c121..19574a1a16 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -301,17 +301,6 @@ typedef unsigned long long int uint64;
 #define UINT64_FORMAT "%" INT64_MODIFIER "u"
 
 /*
- * 128-bit signed and unsigned integers
- *		There currently is only a limited support for the type. E.g. 128bit
- *		literals and snprintf are not supported; but math is.
- */
-#if defined(PG_INT128_TYPE)
-#define HAVE_INT128
-typedef PG_INT128_TYPE int128;
-typedef unsigned PG_INT128_TYPE uint128;
-#endif
-
-/*
  * stdint.h limits aren't guaranteed to be present and aren't guaranteed to
  * have compatible types with our fixed width types. So just define our own.
  */
@@ -642,6 +631,25 @@ typedef NameData *Name;
 #define pg_attribute_noreturn()
 #endif
 
+/*
+ * 128-bit signed and unsigned integers
+ *		There currently is only a limited support for the type. E.g. 128bit
+ *		literals and snprintf are not supported; but math is.
+ */
+#if defined(PG_INT128_TYPE)
+#define HAVE_INT128
+typedef PG_INT128_TYPE int128
+#if defined(pg_attribute_aligned)
+pg_attribute_aligned(MAXIMUM_ALIGNOF)
+#endif
+;
+typedef unsigned PG_INT128_TYPE uint128
+#if defined(pg_attribute_aligned)
+pg_attribute_aligned(MAXIMUM_ALIGNOF)
+#endif
+;
+#endif
+
 
 /*
  * Forcing a function not to be inlined can be useful if it's the slow path of
