diff options
Diffstat (limited to 'otherlibs/unix/gethost.c')
-rw-r--r-- | otherlibs/unix/gethost.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/otherlibs/unix/gethost.c b/otherlibs/unix/gethost.c index 607b6c35f..8d5bb03f5 100644 --- a/otherlibs/unix/gethost.c +++ b/otherlibs/unix/gethost.c @@ -127,7 +127,7 @@ CAMLprim value unix_gethostbyname(value name) char * hostname; #if HAS_GETHOSTBYNAME_R || GETHOSTBYNAME_IS_REENTRANT - hostname = caml_stat_alloc_string(name); + hostname = caml_strdup(String_val(name)); #else hostname = String_val(name); #endif |