- Changes donated by Elemental Security to make it work on HP-UX 11 on
  Itanium2 with HP's 64-bit compiler (SF patch #1225212).
diff --git a/Include/pyport.h b/Include/pyport.h
index f71b9f4..2440c55 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -297,7 +297,7 @@
  *    This isn't reliable.  See Py_OVERFLOWED comments.
  *    X is evaluated more than once.
  */
-#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || (defined(__hpux) && defined(__ia64))
 #define _Py_SET_EDOM_FOR_NAN(X) if (isnan(X)) errno = EDOM;
 #else
 #define _Py_SET_EDOM_FOR_NAN(X) ;