SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I am trying to build PortSentry 1.2_beta - latest available (2013). But unfortonately there is a problem:
Code:
root@:/usr/src/portsentry_beta# make linux
SYSTYPE=linux
Making
cc -O -Wall -DLINUX -DSUPPORT_STEALTH -o ./portsentry ./portsentry.c \
./portsentry_io.c ./portsentry_util.c
./portsentry.c: In function 'PortSentryModeTCP':
./portsentry.c:1187:8: warning: pointer targets in passing argument 3 of 'accept' differ in signedness [-Wpointer-sign]
&length);
^
In file included from /usr/include/netinet/in.h:23:0,
from /usr/include/netdb.h:27,
from ./portsentry.h:30,
from ./portsentry.c:20:
/usr/include/sys/socket.h:243:12: note: expected 'socklen_t * restrict {aka unsigned int * restrict}' but argument is of type 'int *'
extern int accept (int __fd, __SOCKADDR_ARG __addr,
^
./portsentry.c: In function 'PortSentryModeUDP':
./portsentry.c:1384:39: warning: pointer targets in passing argument 6 of 'recvfrom' differ in signedness [-Wpointer-sign]
(struct sockaddr *) &client, &length) < 0)
^
In file included from /usr/include/netinet/in.h:23:0,
from /usr/include/netdb.h:27,
from ./portsentry.h:30,
from ./portsentry.c:20:
/usr/include/sys/socket.h:174:16: note: expected 'socklen_t * restrict {aka unsigned int * restrict}' but argument is of type 'int *'
extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
^
./portsentry.c: In function 'Usage':
./portsentry.c:1584:11: warning: missing terminating " character
printf ("Copyright 1997-2003 Craig H. Rowland <craigrowland at users dot
^
./portsentry.c:1584:3: error: missing terminating " character
printf ("Copyright 1997-2003 Craig H. Rowland <craigrowland at users dot
^
./portsentry.c:1585:1: error: 'sourceforget' undeclared (first use in this function)
sourceforget dot net>\n");
^
./portsentry.c:1585:1: note: each undeclared identifier is reported only once for each function it appears in
./portsentry.c:1585:14: error: expected ')' before 'dot'
sourceforget dot net>\n");
^
./portsentry.c:1585:14: error: stray '\' in program
./portsentry.c:1585:24: warning: missing terminating " character
sourceforget dot net>\n");
^
./portsentry.c:1585:14: error: missing terminating " character
sourceforget dot net>\n");
^
./portsentry.c:1595:1: error: expected ';' before '}' token
}
^
./portsentry_io.c: In function 'ConfigTokenRetrieve':
./portsentry_io.c:321:39: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if ((strstr (buffer, token) != (char) NULL) &&
^
./portsentry_io.c:321:36: warning: comparison between pointer and integer
if ((strstr (buffer, token) != (char) NULL) &&
^
./portsentry_io.c:324:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if (strstr (buffer, "\"") == (char) NULL)
^
./portsentry_io.c:324:31: warning: comparison between pointer and integer
if (strstr (buffer, "\"") == (char) NULL)
^
./portsentry_io.c: In function 'IsBlocked':
./portsentry_io.c:670:44: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if((ipOffset = strstr(buffer, target)) != (char) NULL)
^
./portsentry_io.c:670:41: warning: comparison between pointer and integer
if((ipOffset = strstr(buffer, target)) != (char) NULL)
^
./portsentry_io.c: In function 'SubstString':
./portsentry_io.c:727:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if (strstr (target, find) == (char) NULL)
^
./portsentry_io.c:727:30: warning: comparison between pointer and integer
if (strstr (target, find) == (char) NULL)
^
Makefile:102: recipe for target 'linux' failed
make: *** [linux] Error 1
There are several warnings that get thrown, but the real problem is this:
Code:
./portsentry.c: In function 'Usage':
./portsentry.c:1584:11: warning: missing terminating " character
printf ("Copyright 1997-2003 Craig H. Rowland <craigrowland at users dot
^
./portsentry.c:1584:3: error: missing terminating " character
printf ("Copyright 1997-2003 Craig H. Rowland <craigrowland at users dot
^
./portsentry.c:1585:1: error: 'sourceforget' undeclared (first use in this function)
sourceforget dot net>\n");
^
Open portsentry.c with a text editor and modify line 1584/1585. Remove the line break so that the whole printf(); statement is on one line. Portsentry should then build (with warnings).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.