e55890
diff --git a/configure.in b/configure.in
e55890
index 896e81c1ce..73b1c8ccbb 100644
e55890
--- a/configure.in
e55890
+++ b/configure.in
e55890
@@ -4275,6 +4275,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
e55890
index 2ff522342f..58df86adb3 100644
e55890
--- a/lib/isc/include/isc/platform.h.in
e55890
+++ b/lib/isc/include/isc/platform.h.in
e55890
@@ -289,19 +289,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,