Browse Source

BSD build fix.

Adam Ierymenko 8 years ago
parent
commit
69922b6c39
1 changed files with 2 additions and 1 deletions
  1. 2 1
      osdep/BSDEthernetTap.cpp

+ 2 - 1
osdep/BSDEthernetTap.cpp

@@ -227,7 +227,8 @@ static bool ___removeIp(const std::string &_dev,const InetAddress &ip)
 {
 	long cpid = (long)vfork();
 	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);
 	} else if (cpid > 0) {
 		int exitcode = -1;