lkml.org 
[lkml]   [2003]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectgetprotobyname failure
Date

Hello,

I have a problem with getprotobyname() function.

I wrote a simple program that only uses getprotobyname function

I can run this program on my development machine=20
but when I try to run this program on my basic kernel it gives me the =
"memory fault" error.

I'm using libc-2.2.5 on a powerpc 8xx development kit
so, i'm using the same library on the host and target machine.

my development machine has celeron type processor
and my target board is TQM850L (has ppc_850 processor).

I've replaced my protocols and nsswitch.conf files with host machines (my
protocols file contians "tcp 6 TCP" line)
and that's made no difference.

what can I do?

please help,


my program :

#include <netdb.h>
#include <stdio.h>

int main(void){

struct sockaddr_in addr;
struct protoent *protocol=3DNULL;
protocol=3Dgetprotobyname("tcp");
printf("\n RESULT : %02x \n",protocol->p_proto);

return 0;
}

Yigit CAN
Karel Electronics Corp.
yigit.can@karel.com.tr

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.029 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site