aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/ose/erl_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/sys/ose/erl_main.c')
-rw-r--r--erts/emulator/sys/ose/erl_main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/erts/emulator/sys/ose/erl_main.c b/erts/emulator/sys/ose/erl_main.c
index a17fc7eabc..03119c3fec 100644
--- a/erts/emulator/sys/ose/erl_main.c
+++ b/erts/emulator/sys/ose/erl_main.c
@@ -17,8 +17,16 @@
* %CopyrightEnd%
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <stdlib.h>
+#include "sys.h"
+#include "erl_vm.h"
+#include "global.h"
+#include "ose.h"
+
int
main(int argc, char **argv) {
@@ -30,8 +38,8 @@ main(int argc, char **argv) {
char **tmp_argv = malloc(sizeof(char*)*(argc+1));
for (i = 0; i < argc; i++)
tmp_argv[i+1] = argv[i];
- tmp_argv = "beam";
- erl_start(argc,tmp_argv);
+ tmp_argv[0] = "beam";
+ erl_start(argc+1,tmp_argv);
free(tmp_argv);
} else {
erl_start(argc,argv);