]> rtime.felk.cvut.cz Git - orte.git/commitdiff
A fix for mingw cross-compilation
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 9 Sep 2013 23:51:45 +0000 (01:51 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 9 Sep 2013 23:51:45 +0000 (01:51 +0200)
Note: there are more things that need to be fixed.

configure.ac
orte/include/win32/timeval.h

index 7aeede73f8b70104d0e6e0b2abd9ba823ea2c732..f2d5e1fa2d436e39c2c1d51582dfbe9e002cd990 100644 (file)
@@ -184,6 +184,7 @@ fi
 if test ${WIN} == 'yes' ; then
     AC_CHECK_HEADERS([\
     winsock2.h ws2tcpip.h windows.h w32api/windows.h],,,[[]])
+    AC_CHECK_FUNCS([gettimeofday])
 fi
 # kernel
 if test ${CONFIG_ORTE_KERNEL} == 'yes' ; then
index de08f3b9f7a1ae11253636eeada873712261e9e2..24da07e4a693362b81763cc75b43c30383c492a3 100644 (file)
@@ -12,6 +12,8 @@
 
 #ifdef _WIN32
 
+#ifndef HAVE_GETTIMEOFDAY
+
 #ifndef __PHARLAP
   #include <winsock2.h>   //there is defined struct timeval
 #endif
@@ -62,7 +64,8 @@ static inline int gettimeofday(struct timeval *tv, struct timezone *tz)
     return 0;
 }
 
+#endif /* HAVE_GETTIMEOFDAY */
+
 #endif /* _WIN32 */
 
 #endif /* _TIMEVAL_H */
-