aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/unix/sys_drivers.c
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/sys/unix/sys_drivers.c')
-rw-r--r--erts/emulator/sys/unix/sys_drivers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/sys/unix/sys_drivers.c b/erts/emulator/sys/unix/sys_drivers.c
index 8402197924..97a9c3dfaa 100644
--- a/erts/emulator/sys/unix/sys_drivers.c
+++ b/erts/emulator/sys/unix/sys_drivers.c
@@ -699,6 +699,7 @@ static ErlDrvData spawn_start(ErlDrvPort port_num, char* name,
io_vector[i++].iov_len = sizeof(buffsz);
io_vector[i].iov_base = (void*)&flags;
+ flags = htonl(flags);
io_vector[i++].iov_len = sizeof(flags);
buffsz += sizeof(flags);
@@ -715,6 +716,7 @@ static ErlDrvData spawn_start(ErlDrvPort port_num, char* name,
buffsz += io_vector[i-1].iov_len;
io_vector[i].iov_base = (void*)&env_len;
+ env_len = htonl(env_len);
io_vector[i++].iov_len = sizeof(env_len);
buffsz += io_vector[i-1].iov_len;
@@ -728,6 +730,7 @@ static ErlDrvData spawn_start(ErlDrvPort port_num, char* name,
if (opts->spawn_type == ERTS_SPAWN_EXECUTABLE) {
io_vector[i].iov_base = (void*)&argv_len;
+ argv_len = htonl(argv_len);
io_vector[i++].iov_len = sizeof(argv_len);
buffsz += io_vector[i-1].iov_len;