[erlang-patches] erl_call can now use an IP address for remote node name

Andrew Thompson andrew@REDACTED
Mon Oct 4 17:07:13 CEST 2010


On Mon, Oct 04, 2010 at 03:22:14PM +0200, Bj??rn Gustavsson wrote:
> On Thu, Sep 23, 2010 at 1:46 PM, Julien Barbot <klyr@REDACTED> wrote:
> > Hi,
> >
> > erl_call was not able to connect to a remote node when the specified node
> > with -name contained an IP address.
> >
> > The previous inet_addr/htonl calls were not working with ip addresses.
> >
> > Here is the small patch:
> >
> > git fetch git://github.com/klyr/otp.git erl_call_get_hostent
> >
> 
> The build fails on Windows like this:
> 
> cc.sh -MD -O2 -Wall -I. -I../include -Iconnect -Iencode -Idecode
> -Imisc -Iepmd -Iregistry -Iwin32   -Ilegacy -DWIN32_THREADS
> -D_WIN32_WINNT=0x0500 -DWINVER=0x0500 -o
> /ldisk/daily_build/otp_norel_pu_win32_r14b01.2010-10-03_23/otp_src_R14B01/lib/erl_interface/bin/win32/erl_call.exe
> prog/erl_call.c prog/erl_start.c \
> 
> -L/ldisk/daily_build/otp_norel_pu_win32_r14b01.2010-10-03_23/otp_src_R14B01/lib/erl_interface/obj/win32
> -lei_md   -lsocket
> erl_call.o : error LNK2019: unresolved external symbol _inet_pton
> referenced in function _get_hostent
> C:/cygwin/ldisk/daily_build/otp_norel_pu_win32_r14b01.2010-10-03_23/otp_src_R14B01/lib/erl_interface/bin/win32/erl_call.exe
> : fatal error LNK1120: 1 unresolved externals
> 
> 
> I will drop the branch from pu.
> 

This could probably be resolved with a simple ifdef for windows support.
Windows Vista has inetPton, but on earlier versions you probably want to
use WSAStringToAddress or something (which is available since win2k).

Andrew


More information about the erlang-patches mailing list