From owner-freebsd-hackers Sun May 24 08:06:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA28053 for freebsd-hackers-outgoing; Sun, 24 May 1998 08:06:10 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from relay.ucb.crimea.ua (relay.ucb.crimea.ua [194.93.177.113]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA27781 for ; Sun, 24 May 1998 08:05:12 -0700 (PDT) (envelope-from ru@ucb.crimea.ua) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.8.8/8.8.8) id SAA09965; Sun, 24 May 1998 18:04:50 +0300 (EEST) (envelope-from ru) Message-ID: <19980524180450.A9944@ucb.crimea.ua> Date: Sun, 24 May 1998 18:04:50 +0300 From: Ruslan Ermilov To: Niall Smart , Mara Cabrales , hackers@FreeBSD.ORG Subject: Re: Program with sockets Mail-Followup-To: Niall Smart , Mara Cabrales , hackers@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91i In-Reply-To: ; from Niall Smart on Sun, May 24, 1998 at 02:49:13PM +0100 X-Operating-System: FreeBSD 2.2.6-STABLE i386 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 #include 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