This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: getpeername on LinuxPPC (APUS)



    > 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]