Date: Sun, 24 May 1998 18:04:50 +0300 From: Ruslan Ermilov <ru@ucb.crimea.ua> To: Niall Smart <njs3@doc.ic.ac.uk>, Mara Cabrales <yonny@ingenieria.ingsala.unal.edu.co>, hackers@FreeBSD.ORG Subject: Re: Program with sockets Message-ID: <19980524180450.A9944@ucb.crimea.ua> In-Reply-To: <E0ydb9F-0001T5-00@oak62.doc.ic.ac.uk>; from Niall Smart on Sun, May 24, 1998 at 02:49:13PM %2B0100 References: <yonny@ingenieria.ingsala.unal.edu.co> <E0ydb9F-0001T5-00@oak62.doc.ic.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, May 24, 1998 at 02:49:13PM +0100, Niall Smart wrote:
> On May 24, 4:37am, Mara Cabrales wrote:
> } Subject: Program with sockets
> > Hi
> >
> > I'm doing a program with sockets in my box with FreeBSD 2.2.5,
> > the server run good, but the client, show next error message:
> >
> > Client: connect failure 49
> > client: : No such file or directory
^^^^^^^^^^^^^^^^^^^^^^^^^
# grep 49 /usr/include/sys/errno.h
#define EADDRNOTAVAIL 49 /* Can't assign requested address */
>
> Are you sure you used AF_INET or PF_INET instead of AF_UNIX or
> PF_UNIX everywhere?
>
> Niall
>
I think there is a problem with libc. I just sent PR.
Using printf() with standard non-threaded libc causes errno set to 2.
Try the following:
#include <sys/errno.h>
#include <stdio.h>
void main(void)
{
fprintf(stderr, "errno=%d\n", errno);
fprintf(stderr, "errno=%d\n", errno);
fprintf(stdout, "errno=%d\n", errno);
fprintf(stdout, "errno=%d\n", errno);
}
--
Ruslan Ermilov System Administrator
ru@ucb.crimea.ua United Commercial Bank
+380-652-247647 Simferopol, Crimea
2426679 ICQ Network, UIN
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980524180450.A9944>
