浏览代码

starpu-top: fix include files to compile on windows OSes

Nathalie Furmento 14 年之前
父节点
当前提交
1d60eab361
共有 2 个文件被更改,包括 11 次插入3 次删除
  1. 10 3
      src/top/starputop_connection.c
  2. 1 0
      src/top/starputop_message_queue.h

+ 10 - 3
src/top/starputop_connection.c

@@ -15,16 +15,23 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#ifdef STARPU_HAVE_WINDOWS
+#  include <w32api.h>
+#  define WINVER WindowsXP
+#  include <ws2tcpip.h>
+#else
+#  include <sys/socket.h>
+#  include <netinet/in.h>
+#  include <netdb.h>
+#endif
+
 #include <top/starputop_connection.h>
 #include <top/starputop_message_queue.h>
 #include <starpu_top.h>
 #include <pthread.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
-#include <netdb.h>
 #include <stdlib.h>
 
 const char *STARPUTOP_PORT = "2011";

+ 1 - 0
src/top/starputop_message_queue.h

@@ -15,6 +15,7 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include <sys/types.h>
 #include <semaphore.h> 
 #include <pthread.h>