diff --git a/src/plugins/mpi/mvapich/mvapich.c b/src/plugins/mpi/mvapich/mvapich.c
index 7ec2c92bc0887773afdb4212689217cb7b067420..0d6e8cfd7ef796c253c8b86a427e071c61ed5af9 100644
--- a/src/plugins/mpi/mvapich/mvapich.c
+++ b/src/plugins/mpi/mvapich/mvapich.c
@@ -72,6 +72,19 @@
 
 #include "src/plugins/mpi/mvapich/mvapich.h"
 
+/* NOTE: AIX lacks timersub */
+#ifndef timersub
+#  define timersub(a, b, result)					\
+	do {								\
+		(result)->tv_sec = (a)->tv_sec - (b)->tv_sec;		\
+		(result)->tv_usec = (a)->tv_usec - (b)->tv_usec;	\
+		if ((result)->tv_usec < 0) {				\
+			--(result)->tv_sec;				\
+			(result)->tv_usec += 1000000;			\
+		}							\
+	} while (0)
+#endif
+
 /*
  *  Arguments passed to mvapich support thread.
  */