Thread overview
std.socket undefined UnixAddress?
Jan 24, 2013
Rob T
Jan 24, 2013
Rob T
Jan 24, 2013
Rob T
January 24, 2013
I'm using Linux, which supports unix domain sockets, but when I try to use UnixAddress it's not available.

Anyone know why?

import std.socket;

int main()
{
    Address UnixAddr = new UnixAddress( "path" ); // <- compile error
    return(0);
}

Error: undefined identifier UnixAddress

--rt
January 24, 2013
On Thursday, 24 January 2013 at 06:47:41 UTC, Rob T wrote:
> I'm using Linux, which supports unix domain sockets, but when I try to use UnixAddress it's not available.
>
> Anyone know why?
>
> import std.socket;
>
> int main()
> {
>     Address UnixAddr = new UnixAddress( "path" ); // <- compile error
>     return(0);
> }
>
> Error: undefined identifier UnixAddress
>
> --rt

Looks like socket.d is missing this:

import core.sys.posix.sys.un;

I need this working asap, what's the best way to patch? Just add in the import?

--rt
January 24, 2013
I solved the problem by creating my own version of UnixAddress. The existing implementation needs some work. I'll filed a bug report.

http://d.puremagic.com/issues/show_bug.cgi?id=9384

--rt