On Fri, Feb 14, 2014 at 9:27 AM, Dmitry Timoshkov dmitry@baikal.ru wrote:
Bruno Jesus 00cpxxx@gmail.com wrote:
- /* servname tweaks required by OSX and BSD kernels */
- if (!servname)
serv = NULL;
- else if (!servname[0])
serv = "0";
- else
serv = servname;
Shouldn't 'serv = "0"' be 'serv = ""' ?
No, that is the trick. Linux supports both "" and "0" but OSX/BSD does not support "". So turning the "" into "0" solves the issue.
-- Dmitry.
Bruno