BSD build fix.

This commit is contained in:
Adam Ierymenko 2017-07-07 09:29:24 -07:00
parent 6fc70f7c16
commit 69922b6c39

View File

@ -227,7 +227,8 @@ static bool ___removeIp(const std::string &_dev,const InetAddress &ip)
{ {
long cpid = (long)vfork(); long cpid = (long)vfork();
if (cpid == 0) { if (cpid == 0) {
execl("/sbin/ifconfig","/sbin/ifconfig",_dev.c_str(),"inet",ip.toIpString().c_str(),"-alias",(const char *)0); char ipbuf[64];
execl("/sbin/ifconfig","/sbin/ifconfig",_dev.c_str(),"inet",ip.toIpString(ipbuf),"-alias",(const char *)0);
_exit(-1); _exit(-1);
} else if (cpid > 0) { } else if (cpid > 0) {
int exitcode = -1; int exitcode = -1;