10d019
diff --git a/configure.ac b/configure.ac
10d019
index 26c509e..c1bfd62 100644
10d019
--- a/configure.ac
10d019
+++ b/configure.ac
10d019
@@ -4152,6 +4152,10 @@ if test "yes" = "$use_atomic"; then
2e2c49
 	AC_MSG_RESULT($arch)
2e2c49
 fi
2e2c49
 
2e2c49
+if test ! "$arch" = "x86_64" -a "$have_xaddq" = "yes"; then
2e2c49
+	AC_MSG_ERROR([XADDQ present but disabled by Fedora patch!])
2e2c49
+fi
2e2c49
+
2e2c49
 if test "yes" = "$have_atomic"; then
2e2c49
 	AC_MSG_CHECKING([compiler support for inline assembly code])
2e2c49
 
2e2c49
diff --git a/lib/isc/include/isc/platform.h.in b/lib/isc/include/isc/platform.h.in
10d019
index c902d46..9c7c342 100644
2e2c49
--- a/lib/isc/include/isc/platform.h.in
2e2c49
+++ b/lib/isc/include/isc/platform.h.in
10d019
@@ -284,19 +284,25 @@
2e2c49
  * If the "xaddq" operation (64bit xadd) is available on this architecture,
2e2c49
  * ISC_PLATFORM_HAVEXADDQ will be defined.
2e2c49
  */
2e2c49
-@ISC_PLATFORM_HAVEXADDQ@
89a891
 
89a891
 /*
89a891
- * If the 32-bit "atomic swap" operation is available on this
89a891
- * architecture, ISC_PLATFORM_HAVEATOMICSTORE" will be defined.
89a891
+ * If the 64-bit "atomic swap" operation is available on this
89a891
+ * architecture, ISC_PLATFORM_HAVEATOMICSTOREQ" will be defined.
89a891
  */
89a891
-@ISC_PLATFORM_HAVEATOMICSTORE@
89a891
+
2e2c49
+#ifdef __x86_64__
2e2c49
+#define ISC_PLATFORM_HAVEXADDQ 1
89a891
+#define ISC_PLATFORM_HAVEATOMICSTOREQ 1
2e2c49
+#else
2e2c49
+#undef ISC_PLATFORM_HAVEXADDQ
89a891
+#undef ISC_PLATFORM_HAVEATOMICSTOREQ
2e2c49
+#endif
2e2c49
 
2e2c49
 /*
89a891
- * If the 64-bit "atomic swap" operation is available on this
89a891
+ * If the 32-bit "atomic swap" operation is available on this
89a891
  * architecture, ISC_PLATFORM_HAVEATOMICSTORE" will be defined.
89a891
  */
89a891
-@ISC_PLATFORM_HAVEATOMICSTOREQ@
89a891
+@ISC_PLATFORM_HAVEATOMICSTORE@
89a891
 
89a891
 /*
89a891
  * If the "compare-and-exchange" operation is available on this architecture,