# HG changeset patch
# User Barry Tannenbaum <barry.m.tannenbaum@intel.com>
# Date 1439905700 14400
#      Tue Aug 18 09:48:20 2015 -0400
# Node ID 0ca389dfafa50191bbc43dac43d62f950c78e18f
# Parent  6b1b4c4beef4698510e6d8b27740e1657f24f5e0
Fix usage of execvp on Windows

diff --git a/utils/hwloc/hwloc-bind.c b/utils/hwloc/hwloc-bind.c
--- a/utils/hwloc/hwloc-bind.c
+++ b/utils/hwloc/hwloc-bind.c
@@ -17,6 +17,11 @@
 
 #include "misc.h"
 
+#ifdef _WIN32
+#include <process.h>
+#define execvp _execvp
+#endif
+
 void usage(const char *name, FILE *where)
 {
   fprintf(where, "Usage: %s [options] <location> -- command ...\n", name);
@@ -396,7 +401,7 @@
     return EXIT_FAILURE;
   }
 
-  ret = execvp(argv[0], argv);
+  ret = (int)execvp(argv[0], argv);
   if (ret) {
       fprintf(stderr, "%s: Failed to launch executable \"%s\"\n",
               callname, argv[0]);
