bind(): Can't assign requested address

Anatoly Vorobey mellon at
Tue Nov 23 04:26:42 PST 2004

On Mon, Nov 22, 2004 at 10:16:37PM -0800, Dave Roe wrote:
> >Please try this patch and tell me if it helps. I don't have an OS X
> >machine to test it with.
> >
> >+    memset(&addr, 0, sizeof(addr));
> that seemed to solve the problem I was experiencing with bind. 
> Christopher's suggestion of running it without the -l option also 
> worked.

Right. Apparently on (some versions of?) OS X sockaddr_in has hidden
fields that need to be zeroed if the interface is specified explicitly,
but work okay otherwise.

I've committed the fix.

"There's nothing simply good, nor ill alone" -- John Donne

More information about the memcached mailing list