Menu

#2 compilation on linux

open
nobody
None
5
2006-11-09
2006-11-09
devloop
No

Got the following warnings when I type "make" on Linux
:

cc rtelnet.c -o rtelnet
rtelnet.c: In function 'main':
rtelnet.c:81: warning: incompatible implicit
declaration of built-in function 'exit'
rtelnet.c:138: warning: incompatible implicit
declaration of built-in function 'exit'
cc rtelnetd.c -o rtelnetd
rtelnetd.c: In function 'main':
rtelnetd.c:66: warning: incompatible implicit
declaration of built-in function 'exit'
rtelnetd.c:74: warning: incompatible implicit
declaration of built-in function 'exit'
rtelnetd.c:83: warning: incompatible implicit
declaration of built-in function 'exit'

It's because stdlib.h is not included... don't know if
you got it under BSD

And if I launch rtelnetd got a segmentation fault.
error is here :
sin.sin_port = htons(atoi(REMOTE_PORT));
REMOTE_PORT is already an int so change it to :
sin.sin_port = htons(REMOTE_PORT);

and it works :)

Discussion


Log in to post a comment.