netbsd port ?

Christos Zoulas christos at zoulas.com
Wed Jul 8 05:14:27 PDT 2009


On Jul 8,  5:39pm, m.renju at teles.com ("Renju Mathew") wrote:
-- Subject: RE: netbsd port ?

| Hi
| 
| Thanks for all the support. I was able to move a little further in the
| OpenJDK compilation on NetBSD3.1
| 
| But Now I am facing a new problem. As I continue with the compilation it
| ended up with the following error.

NetBSD does not have getpeereid(), use the following implementation from
openssh:


#if defined(SO_PEERCRED)
int
getpeereid(int s, uid_t *euid, gid_t *gid)
{
        struct ucred cred;
        socklen_t len = sizeof(cred);

        if (getsockopt(s, SOL_SOCKET, SO_PEERCRED, &cred, &len) < 0)
                return (-1);
        *euid = cred.uid;
        *gid = cred.gid;

        return (0);
}
#else
int
getpeereid(int s, uid_t *euid, gid_t *gid)
{
        *euid = geteuid();
        *gid = getgid();

        return (0);
}
#endif /* defined(SO_PEERCRED) */




More information about the bsd-port-dev mailing list