if (!gOTInitialized) _MD_FinishInitNetAccess();
PRStatus _MD_gethostname(char *name, int namelen){    OSStatus err;    InetInterfaceInfo info;    /*     *    On a Macintosh, we don't have the concept of a local host name.     *    We do though have an IP address & everyone should be happy with     *     a string version of that for a name.     *    The alternative here is to ping a local DNS for our name, they     *    will often know it.  This is the cheap, easiest, and safest way out.     */    /* Make sure the string is as long as the longest possible address */    if (namelen < strlen("123.123.123.123")) {        err = kEINVALErr;        goto ErrorExit;    }    err = OTInetGetInterfaceInfo(&info, kDefaultInetInterface);    if (err != kOTNoError)        goto ErrorExit;        OTInetHostToString(info.fAddress, name);        return PR_SUCCESS;ErrorExit:    macsock_map_error(err);    return PR_FAILURE;}