Issue on OSX

43 views
Skip to first unread message

jeethurao

unread,
Apr 19, 2009, 6:18:37 AM4/19/09
to beanstalk-talk
Hi,
I just compiled beanstalk (from the git master) on OSX (Leopard
v10.5.6). While trying to run beanstalkd, I got the following error.

jrmb:~ jeethurao$ beanstalkd -d -l 127.0.0.1 -p 11300
beanstalkd: ../net.c:59 in make_server_socket: bind(): Can't assign
requested address
beanstalkd: ../beanstalkd.c:272 in main: make_server_socket()

Uncommenting memset(&addr, 0, sizeof addr); from net.c line 53 fixed
the issue.

Regards,

Jeethu Rao

diff --git a/net.c b/net.c
index 05ac52b..f438702 100644
--- a/net.c
+++ b/net.c
@@ -50,7 +50,7 @@ make_server_socket(struct in_addr host_addr, int
port)
setsockopt(fd, SOL_SOCKET, SO_LINGER, &linger, sizeof linger);
setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &flags, sizeof flags);

- /*memset(&addr, 0, sizeof addr);*/
+ memset(&addr, 0, sizeof addr);

addr.sin_family = AF_INET;
addr.sin_port = htons(port);


Keith Rarick

unread,
Apr 19, 2009, 9:26:36 PM4/19/09
to beansta...@googlegroups.com
Thanks! I just pushed a fix. It's the same idea but a little less code.

kr

Reply all
Reply to author
Forward
0 new messages