site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On 16 May 2005, at 23:39, Ryan Lum wrote: if(bind(s, (struct sockaddr *)&sa, sizeof(sa) < 0)) { Your code has been wrong for 10 years, it should be if(bind(s, (struct sockaddr *)&sa, sizeof(sa)) < 0) { Jonas _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... With gcc 3.3 no problems, but it is returning -1 with 4.0. I am no socket expert, and any debugging advice would help. You were passing 0 as namelen parameter (since sizeof(sa) > 0). Not sure why this would work with gcc 3 and not with 4 though. This email sent to site_archiver@lists.apple.com