1 Not sure if this is right, but OCAML_STDLIB_DIR can be undefined
2 in our cross-compiler. It's only used in a one place in the C
3 code so this works around it.
5 diff --exclude _build -urN ocaml-3.11.0+beta1.orig/byterun/dynlink.c ocaml-3.11.0+beta1.mingw/byterun/dynlink.c
6 --- ocaml-3.11.0+beta1.orig/byterun/dynlink.c 2008-04-22 13:24:10.000000000 +0100
7 +++ ocaml-3.11.0+beta1.mingw/byterun/dynlink.c 2008-11-15 15:43:52.000000000 +0000
10 stdlib = getenv("OCAMLLIB");
11 if (stdlib == NULL) stdlib = getenv("CAMLLIB");
12 - if (stdlib == NULL) stdlib = OCAML_STDLIB_DIR;
14 +#ifdef OCAML_STDLIB_DIR
15 + stdlib = OCAML_STDLIB_DIR;
19 ldconfname = caml_stat_alloc(strlen(stdlib) + 2 + sizeof(LD_CONF_NAME));
20 strcpy(ldconfname, stdlib);
21 strcat(ldconfname, "/" LD_CONF_NAME);