diff options
author | Nicolás Ojeda Bär <n.oje.bar@gmail.com> | 2017-09-28 10:03:20 +0200 |
---|---|---|
committer | Mark Shinwell <mshinwell@gmail.com> | 2017-09-28 09:03:20 +0100 |
commit | 2751420255305f7475d3a6ae8a7dff747c0a5799 (patch) | |
tree | b386fad6b4b0e893610a5cd40a2a1acbe2a1ba35 /otherlibs | |
parent | 050ceef423c5d627be49fb7f8646f83a5fcc2ca2 (diff) | |
download | ocaml-2751420255305f7475d3a6ae8a7dff747c0a5799.tar.gz |
Fix gethost.c C const warning when using compile-time -safe-string (#1368)
Diffstat (limited to 'otherlibs')
-rw-r--r-- | otherlibs/unix/gethost.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/otherlibs/unix/gethost.c b/otherlibs/unix/gethost.c index 6c912e5f7b..49e5bdeadb 100644 --- a/otherlibs/unix/gethost.c +++ b/otherlibs/unix/gethost.c @@ -135,11 +135,7 @@ CAMLprim value unix_gethostbyname(value name) if (! caml_string_is_c_safe(name)) caml_raise_not_found(); -#if HAS_GETHOSTBYNAME_R || GETHOSTBYNAME_IS_REENTRANT hostname = caml_stat_strdup(String_val(name)); -#else - hostname = String_val(name); -#endif #if HAS_GETHOSTBYNAME_R == 5 { @@ -165,9 +161,7 @@ CAMLprim value unix_gethostbyname(value name) #endif #endif -#if HAS_GETHOSTBYNAME_R || GETHOSTBYNAME_IS_REENTRANT caml_stat_free(hostname); -#endif if (hp == (struct hostent *) NULL) caml_raise_not_found(); return alloc_host_entry(hp); |