File slsnif-compiling_fixes.patch of Package slsnif
diff -urB slsnif-0.4.4/src/rcfile.h slsnif-0.4.4-patch/src/rcfile.h
--- slsnif-0.4.4/src/rcfile.h 2005-02-05 22:54:28.000000000 +0200
+++ slsnif-0.4.4-patch/src/rcfile.h 2025-07-14 15:00:42.410661793 +0300
@@ -24,7 +24,7 @@
typedef struct _rc_struct {
char *name;
- void (*fn)();
+ void (*fn)(tty_struct *ptr, char *value);
} rc_struct;
/* external functions */
diff -urB slsnif-0.4.4/src/slsnif.c slsnif-0.4.4-patch/src/slsnif.c
--- slsnif-0.4.4/src/slsnif.c 2005-02-09 01:07:59.000000000 +0200
+++ slsnif-0.4.4-patch/src/slsnif.c 2025-07-14 14:56:05.706857879 +0300
@@ -157,7 +157,7 @@
struct timeb tstamp;
char tbuf[29];
char tmp[25];
- char tmp1[4];
+ char tmp1[8];
#else
#ifdef HAVE_TIME_H
time_t tstamp;
@@ -220,9 +220,9 @@
/* print total number of bytes if necessary */
if (tty_data.dspbytes) {
buffer[0] = 0;
- sprintf(buffer, "\n%s %i", TOTALBYTES, n);
+ sprintf((char *)buffer, "\n%s %i", TOTALBYTES, n);
if (out == STDOUT_FILENO) setColor(out, tty_data.bclr);
- write (out, buffer, strlen(buffer));
+ write (out, buffer, strlen((char *)buffer));
}
for (entry = (aux ? tee_files[0] : tee_files[1]); entry; entry = entry->next) {
if (n != write(entry->fd, buffer, n)) fatalError(TEEWRTFAIL);
@@ -313,25 +313,23 @@
if (pid >= 0) kill(pid, SIGINT);
}
-RETSIGTYPE sighupP(int sig) {
+void sighupP(int sig) {
/* parent signal handler for SIGHUP */
if (pid >= 0) kill(pid, SIGHUP);
- return;
}
-RETSIGTYPE sighupC(int sig) {
+void sighupC(int sig) {
/* child signal handler for SIGHUP */
reseek = TRUE;
- return;
}
-RETSIGTYPE sigintP(int sig) {
+void sigintP(int sig) {
/*parent signal handler for SIGINT */
closeAll();
_exit(1);
}
-RETSIGTYPE sigintC(int sig) {
+void sigintC(int sig) {
/* child signal handler for SIGINT */
/* close read pipes */
if (tty_data.ptypipefd[0] >= 0) close(tty_data.ptypipefd[0]);
@@ -339,14 +337,14 @@
_exit(1);
}
-RETSIGTYPE sigchldP(int sig) {
+void sigchldP(int sig) {
/* signal handler for SIGCHLD */
int status;
wait(&status);
}
-RETSIGTYPE sigusr1P(int sig) {
+void sigusr1P(int sig) {
/* signal handler for SIGUSR1 */
needsync = TRUE;
return;
@@ -549,7 +547,7 @@
close(tty_data.portpipefd[1]);
signal(SIGINT, sigintC);
signal(SIGHUP, sighupC);
- pipeReader(&tty_data);
+ pipeReader();
break;
case -1:
/* fork() failed */
diff -urB slsnif-0.4.4/src/slsnif.h slsnif-0.4.4-patch/src/slsnif.h
--- slsnif-0.4.4/src/slsnif.h 2005-02-09 00:53:21.000000000 +0200
+++ slsnif-0.4.4-patch/src/slsnif.h 2025-07-14 14:57:27.349711048 +0300
@@ -65,7 +65,7 @@
#define max(x,y) ((x) > (y) ? (x) : (y))
-#define BUFFSIZE 32
+#define BUFFSIZE 48
#define PRFXSIZE 12
#define DEFBAUDRATE B9600
#define WHITE 15