    /* If we are cleaning up when the caller didn't retrieve process
       status for some reason, encourage the process to go away.  */
    if (done)
-@@ -491,6 +510,7 @@ pex_unix_wait (struct pex_obj *obj, pid_t pid, int *status,
+@@ -491,6 +517,7 @@ pex_unix_wait (struct pex_obj *obj, pid_t pid, int *status,
      }
  
    return 0;

   return toplev_main (argc, (const char **) argv);
 }
diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c
index 366e96e..852ee70 100644
--- a/libiberty/pex-unix.c
+++ b/libiberty/pex-unix.c
@@ -56,6 +56,9 @@ extern int errno;
 #include <sys/stat.h>
 #endif
 
+#if defined(__native_client__)
+#include "nacl_spawn.h"
+#endif
 
 #ifdef vfork /* Autoconf may define this to fork for us. */
 # define VFORK_STRING "fork"
@@ -361,6 +364,12 @@ pex_unix_exec_child (struct pex_obj *obj, int flags, const char *executable,
                      int in, int out, int errdes,
 		     int toclose, const char **errmsg, int *err)
 {

   pid_t pid;
 
   /* We declare these to be volatile to avoid warnings from gcc about
@@ -469,6 +485,7 @@ pex_unix_exec_child (struct pex_obj *obj, int flags, const char *executable,
 
       return pid;
     }
