[15810] in Athena Bugs

home help back first fref pref prev next nref lref last post

sgi 8.1.16: gcc from gnu

daemon@ATHENA.MIT.EDU (Adrian M Soviani)
Sat Feb 28 06:07:56 1998

To: bugs@MIT.EDU
Date: Sat, 28 Feb 1998 06:07:52 EST
From: Adrian M Soviani <soviani@MIT.EDU>

System name:		w20-575-71
Type and version:	IP22 8.1.16
Display type:		NG1

What were you trying to do?
	gcc -Wall -O -DSGI -DSTRINGS  wd.c -o wdg

What's wrong:
        gcc -Wall -O -DSGI -DSTRINGS  wd.c -o wdg
	udp.c: In function `udp_recv_str':
	In file included from wd.c:41:
	udp.c:100: incompatible type for argument 5 of `recvfrom'
	auxiliary.c: In function `signature_init':
	In file included from wd.c:45:
	auxiliary.c:64: warning: implicit declaration of function `srandom'
	auxiliary.c: In function `signature':
	auxiliary.c:75: warning: implicit declaration of function `random'
	*** Error code 1 (bu21)    <<<< compiler error

What should have happened:
	In the code, if I change
	ret=recvfrom(sock, udp_buffer, max_message-1, 0, from, 0);  =>>
	ret=recvfrom(sock, udp_buffer, max_message-1, 0, &from, 0);
	I get no error.
	Gcc shouldn't crash parsing the C file (it can signal an error,
	thought)
	
Please describe any relevant documentation references:
	int udp_recv_str(int sock, char **msg){
	struct sockaddr from;
	int ret;

	udp_buffer[0]=0;
	memset(&from,0,sizeof(from));
	ret=recvfrom(sock, udp_buffer, max_message-1, 0, from, 0);
 

home help back first fref pref prev next nref lref last post