This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
Re: getpeername on LinuxPPC (APUS)
- To: aj@arthur.rhein-neckar.de
- Subject: Re: getpeername on LinuxPPC (APUS)
- From: "F. Heitkamp" <fheitka@ibm.net>
- Date: Thu, 1 Jul 1999 07:36:01 -0400
- CC: fheitka@ibm.net, glibc-linux@ricardo.ecn.wfu.edu
- References: <199906301126.LAA157062@out1.ibm.net> <u8oghxvkw2.fsf@arthur.rhein-neckar.de>
- Reply-To: glibc-linux@ricardo.ecn.wfu.edu
> I'm trying to compile netkit-telenet-0.12 and it gives an error when run.
> "getpeername: Socket operation on non-socket.
> In the code the line is:
> if(getpeername(0,(struct sockaddr *)&from, &fromlen)<0) {
> perror("getpeername");
> ...
Read the manpage or the glibc manual for getpeername. The error
(ENOTSOCK) is documented.
Anybody got any idea why this code would fail with glibc-2.1.1? I've
never had trouble with it on my other system (PC LINUX). I assume the
"0" refers to some standard socket that should be available on my
system. Can someone explain? Sorry in advance for the newbie question.
Fred