diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index b227e6ce4f8712c08f60cb0e62473c5930d2c6ac..535926a937ac9cfb66d5935e76c763cc8a3cdc78 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -3003,7 +3003,9 @@ ProcessInterrupts(void)
  */
 #if defined(__ia64__) || defined(__ia64)
 
+#ifdef __INTEL_COMPILER
 #include <asm/ia64regs.h>
+#endif
 
 static __inline__ char *
 ia64_get_bsp(void)