I receive the following errors compiling on CentOS:
[root@localhost portsentry_beta]# make linux
cc -O -Wall -DLINUX -DSUPPORT_STEALTH -o ./portsentry ./portsentry.c \
./portsentry.c: In function ‘PortSentryModeTCP’:
./portsentry.c:1187: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness
./portsentry.c: In function ‘PortSentryModeUDP’:
./portsentry.c:1384: warning: pointer targets in passing argument 6 of ‘recvfrom’ differ in signedness
./portsentry.c: In function ‘Usage’:
./portsentry.c:1584: error: missing terminating " character
./portsentry.c:1585: error: ‘sourceforget’ undeclared (first use in this function)
./portsentry.c:1585: error: (Each undeclared identifier is reported only once
./portsentry.c:1585: error: for each function it appears in.)
./portsentry.c:1585: error: expected ‘)’ before ‘dot’
./portsentry.c:1585: error: stray ‘\’ in program
./portsentry.c:1585: error: missing terminating " character
./portsentry.c:1595: error: expected ‘;’ before ‘}’ token
make: *** [linux] Error 1
I read daywalker's post and will try to fix that part by removing the linebreak.
Alright, I changed:
printf ("Copyright 1997-2003 Craig H. Rowland <craigrowland at users dot
sourceforget dot net>\n");
printf ("Copyright 1997-2003 Craig H. Rowland <craigrowland at users dot sourceforget dot net>\n");
and I removed one of the line breaks after:
printf ("*** PLEASE READ THE DOCS BEFORE USING *** \n\n");
But I do not know what to do about the other errors.
Can anyone else help with the compiling? I have no idea what to do with the accept and recvfrom?
.* not a ?
You corrected the error already. Just ignore the other errors and do the "make install" and it will complete without a hitch.
I also ran into this issue. It has to do with compiler, as when the software was written the coding standards were not as strict.
Thank you for finally responding, I will try it out.
If I put "unsigned" before the following lines:
int length, portCount = 0, ports[MAXSOCKS];
int length, ports[MAXSOCKS], openSockfd[MAXSOCKS], result = TRUE;
Would it change anything? It stops the error messages.