Skip to content

Commit

Permalink
Also "unconst" the execvp() arg vector to avoid compiler whines.
Browse files Browse the repository at this point in the history
  • Loading branch information
anttikantee committed Jun 23, 2015
1 parent 2417138 commit 61ff427
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions buildrump.sh
Expand Up @@ -435,7 +435,9 @@ maketoolwrapper ()
else
rm -f ${OBJDIR}/wrapper.c
exec 3>&1 1>${OBJDIR}/wrapper.c
printf '#include <string.h>\n#include <unistd.h>\n\n'
printf '#include <inttypes.h>\n'
printf '#include <string.h>\n'
printf '#include <unistd.h>\n\n'
printf 'static const char *mngl_from[] = {\n'
(
IFS=:
Expand All @@ -457,7 +459,8 @@ maketoolwrapper ()
printf '};\n\n'
( IFS=' ' printf '%s' "${WRAPPERBODY}" )
printf '\targv[0] = "%s";\n' ${fptool}
printf '\texecvp(argv[0], argv);\n}\n'
printf '\texecvp(argv[0], (void *)(uintptr_t)argv);\n'
printf '\treturn 0;\n}\n'
exec 1>&3 3>&-
${HOST_CC} ${OBJDIR}/wrapper.c -o ${tname} \
|| die failed to build wrapper for ${tool}
Expand Down

0 comments on commit 61ff427

Please sign in to comment.