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