summaryrefslogtreecommitdiff
path: root/net-analyzer/nsat/files
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/nsat/files')
-rw-r--r--net-analyzer/nsat/files/nsat-1.5-amd64-compat.patch33
-rw-r--r--net-analyzer/nsat/files/nsat-1.5-configure.patch25
-rw-r--r--net-analyzer/nsat/files/nsat-1.5-libtirpc.patch33
-rw-r--r--net-analyzer/nsat/files/nsat-1.5-lvalue-gcc4.patch11
-rw-r--r--net-analyzer/nsat/files/nsat-1.5-misc.patch108
-rw-r--r--net-analyzer/nsat/files/nsat-1.5-strip.patch10
-rw-r--r--net-analyzer/nsat/files/nsat-1.5-va_list.patch27
7 files changed, 247 insertions, 0 deletions
diff --git a/net-analyzer/nsat/files/nsat-1.5-amd64-compat.patch b/net-analyzer/nsat/files/nsat-1.5-amd64-compat.patch
new file mode 100644
index 000000000000..883ad26cdfaf
--- /dev/null
+++ b/net-analyzer/nsat/files/nsat-1.5-amd64-compat.patch
@@ -0,0 +1,33 @@
+--- a/src/mod/xp_icmp_echo.c
++++ b/src/mod/xp_icmp_echo.c
+@@ -90,7 +90,7 @@
+ fprintf(stderr,"[%d bytes] sent, waiting for reponse.\n", res);
+ #endif
+
+- recv_pack = read_icmp(&res, ICMP_ECHOREPLY, -1);
++ recv_pack = read_icmp((ssize_t *)&res, ICMP_ECHOREPLY, -1);
+
+ if (recv_pack == NULL || (unsigned)res < sizeof(ip) + 8) {
+ #ifdef EBUG
+--- a/src/mod/xp_icmp_infr.c
++++ b/src/mod/xp_icmp_infr.c
+@@ -83,7 +83,7 @@
+ fprintf(stderr,"[%d bytes] sent, waiting for reponse.\n", res);
+ #endif
+
+- recv_pack = read_icmp(&res, ICMP_IREQREPLY, -1);
++ recv_pack = read_icmp((ssize_t *)&res, ICMP_IREQREPLY, -1);
+
+ if (recv_pack == NULL || (unsigned)res < sizeof(ip) + 8) {
+ #ifdef EBUG
+--- a/src/mod/xp_udp_probe.c
++++ b/src/mod/xp_udp_probe.c
+@@ -92,7 +92,7 @@
+ #ifdef EBUG
+ fprintf(stderr,"[%d bytes] sent, waiting for reponse.\n", res);
+ #endif
+- recv_pack = read_icmp(&res, ICMP_UNREACH, -1);
++ recv_pack = read_icmp((ssize_t *)&res, ICMP_UNREACH, -1);
+
+ if (recv_pack == NULL || (unsigned)res < sizeof(ip) + 8) {
+ #ifdef EBUG
diff --git a/net-analyzer/nsat/files/nsat-1.5-configure.patch b/net-analyzer/nsat/files/nsat-1.5-configure.patch
new file mode 100644
index 000000000000..d1bc1f95e6bb
--- /dev/null
+++ b/net-analyzer/nsat/files/nsat-1.5-configure.patch
@@ -0,0 +1,25 @@
+--- a/configure.in
++++ b/configure.in
+@@ -15,7 +15,6 @@
+ else
+ AC_MSG_RESULT(crappy :P)
+ fi
+- LEETCC=$ac_cv_prog_gcc;
+ AC_PROG_CXX
+ AC_PROG_INSTALL
+ AC_PROG_MAKE_SET
+@@ -45,11 +44,11 @@
+ if test $LEETCC = yes; then
+ CCOPTS='-Wall -O6 -funroll-loops -ansi -fPIC -DLINUX'
+ else
+- CCOPTS='-DLINUX'
++ CCOPTS="${CFLAGS} -DLINUX"
+ fi
+- CFLAGS="$CCOPTS"
+- SMBCFLAGS="-Wall -DLINUX -DNETGROUP -DALLOW_CHANGE_PASSWORD -DFAST_SHARE_MODES -DNO_ASMSIGNALH -DGLIBC2"
++ SMBCFLAGS="${CCOPTS} -Wall -DLINUX -DNETGROUP -DALLOW_CHANGE_PASSWORD -DFAST_SHARE_MODES -DNO_ASMSIGNALH -DGLIBC2"
+ SMBLFLAGS="-lnsl -lcrypt"
++ CFLAGS="${CCOPTS} -Wall -ansi -fPIC -DLINUX"
+ ;;
+ *Darwin* | *Mac* | *MAC*)
+ AC_MSG_RESULT(found MAC OS X)
diff --git a/net-analyzer/nsat/files/nsat-1.5-libtirpc.patch b/net-analyzer/nsat/files/nsat-1.5-libtirpc.patch
new file mode 100644
index 000000000000..c91afd3a78fa
--- /dev/null
+++ b/net-analyzer/nsat/files/nsat-1.5-libtirpc.patch
@@ -0,0 +1,33 @@
+--- a/configure.in
++++ b/configure.in
+@@ -195,6 +195,8 @@
+ AC_FUNC_VPRINTF
+ AC_CHECK_FUNCS(select socket strdup strstr random srandom snprintf setsockopt initstate gettimeofday strerror)
+
++PKG_CHECK_MODULES([TIRPC], [libtirpc], [], [AC_MSG_NOTICE([Using glibc rpc support])])
++
+ AC_OUTPUT(Makefile tools/Makefile src/Makefile src/mod/Makefile src/smb/Makefile src/libmix++/Makefile src/libmix++/mix/net.h)
+
+ AC_MSG_RESULT()
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -36,7 +36,7 @@
+ @cd mod ; $(MAKE) modobj
+
+ ../nsat: modobj
+- ${GPP} ${CFLAGS} ${LDFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB}
++ ${GPP} ${CFLAGS} ${LDFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB} @TIRPC_LIBS@
+
+ pidalloc.o:
+ ${GPP} ${CFLAGS} -c pidalloc.cpp
+--- a/src/mod/Makefile.in
++++ b/src/mod/Makefile.in
+@@ -35,7 +35,7 @@
+ ${GPP} ${CFLAGS} -c osscan.cpp
+
+ rpc.o:
+- ${GPP} ${CFLAGS} -c rpc.cpp
++ ${GPP} ${CFLAGS} @TIRPC_CFLAGS@ -c rpc.cpp
+
+ www.o:
+ ${GPP} ${CFLAGS} -c www.cpp
diff --git a/net-analyzer/nsat/files/nsat-1.5-lvalue-gcc4.patch b/net-analyzer/nsat/files/nsat-1.5-lvalue-gcc4.patch
new file mode 100644
index 000000000000..b4020b3f47ed
--- /dev/null
+++ b/net-analyzer/nsat/files/nsat-1.5-lvalue-gcc4.patch
@@ -0,0 +1,11 @@
+--- a/src/smb/ADMsmb.c
++++ b/src/smb/ADMsmb.c
+@@ -123,7 +123,7 @@
+ {
+ usleep (100000);
+
+- if (recvfrom (socket_client, buffer2, sizeof (buffer2), 0, (struct sockaddr *) &sin_dst, &(int) longueur) != -1)
++ if (recvfrom (socket_client, buffer2, sizeof (buffer2), 0, (struct sockaddr *) &sin_dst, (int *) &longueur) != -1)
+ {
+
+ if (nmb2->rep_num != 0)
diff --git a/net-analyzer/nsat/files/nsat-1.5-misc.patch b/net-analyzer/nsat/files/nsat-1.5-misc.patch
new file mode 100644
index 000000000000..f94fd24527b5
--- /dev/null
+++ b/net-analyzer/nsat/files/nsat-1.5-misc.patch
@@ -0,0 +1,108 @@
+* link against dev-libs/libmix
+* parallel $(MAKE)
+* usr/local/ -> usr/
+* LDFLAGS
+* verbose CC
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -7,14 +7,14 @@
+ # # #### # # #
+
+ # Change me if you want...
+-INSTALL_PATH=/usr/local/bin
+-MAN_PATH=/usr/local/man
++INSTALL_PATH=/usr/bin
++MAN_PATH=/usr/man
+
+ # If you change this, change src/lang.h as well
+-DATA_PATH=/usr/local/share/nsat
++DATA_PATH=/usr/share/nsat
+
+ all:
+- @cd src;make all
++ @cd src; $(MAKE) all
+ @echo ""
+ @echo " Compiling is done!"
+ @echo " You can now 'make install' to put the files in place."
+@@ -58,5 +58,5 @@
+ doc/nsat.8:
+ @echo "Hmm, can't find manpage -- skipping :/"
+
+-nsat:
+- @make all
++nsat: src
++ $(MAKE) all
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -21,22 +21,22 @@
+
+ MIXOBJ = libmix++/net/net.o libmix++/misc/misc.o libmix++/misc/exclude.o
+
+-all: ../smb-ns $(OBJ) modobj mixobj ../nsat
++all: ../smb-ns $(OBJ) modobj ../nsat
+
+ ../smb-ns:
+- @cd smb ; make smb
++ @cd smb ; $(MAKE) smb
+
+-mixobj: libmix++/Makefile
+- @cd libmix++ ; make
++#mixobj: libmix++/Makefile
++# @cd libmix++ ; $(MAKE)
+
+-libmix++/Makefile:
+- @cd .. ; ./configure
++#libmix++/Makefile:
++# @cd .. ; ./configure
+
+ modobj:
+- @cd mod ; make modobj
++ @cd mod ; $(MAKE) modobj
+
+-../nsat:
+- ${GPP} ${CFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB}
++../nsat: modobj
++ ${GPP} ${CFLAGS} ${LDFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB}
+
+ pidalloc.o:
+ ${GPP} ${CFLAGS} -c pidalloc.cpp
+@@ -63,11 +63,11 @@
+ ${GPP} ${CFLAGS} -c Logging.cpp
+
+ clean:
+- cd mod && make clean
++ cd mod && $(MAKE) clean
+ rm -f core *.o ../*.log *.log *~ ../nsat ../.nsrc ../.nspid
+
+ distclean: clean
+- @cd mod ; make clean
+- @cd smb ; make clean
+- @cd libmix++ ; make clean
++ @cd mod ; $(MAKE) clean
++ @cd smb ; $(MAKE) clean
++ @cd libmix++ ; $(MAKE) clean
+ rm -f mod/Makefile Makefile
+--- a/src/smb/Makefile.in
++++ b/src/smb/Makefile.in
+@@ -11,7 +11,6 @@
+ LIBDIR = $(BASEDIR)/lib
+ VARDIR = $(BASEDIR)/var
+ INSTALLPERMS = 0755
+-FLAGS1 = -O3
+ LIBS1 =
+ SHELL = /bin/sh
+ srcdir = ./
+@@ -53,10 +52,10 @@
+ .SUFFIXES: .c .o .h
+
+ .c.o: $(INCLUDES)
+- @$(CC) $(CFLAGS) -c $(srcdir)$*.c -o $(srcdir)$*.o
++ $(CC) $(CFLAGS) $(LDFLAGS) -c $(srcdir)$*.c -o $(srcdir)$*.o
+
+ smb: msg $(CLIENT_OBJ) $(ARCFOUR_OBJ)
+- @$(CC) $(CFLAGS) -o $(BINARY) $(CLIENT_OBJ) $(ARCFOUR_OBJ) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BINARY) $(CLIENT_OBJ) $(ARCFOUR_OBJ) $(LIBS)
+ @echo done
+
+ msg:
diff --git a/net-analyzer/nsat/files/nsat-1.5-strip.patch b/net-analyzer/nsat/files/nsat-1.5-strip.patch
new file mode 100644
index 000000000000..99fe77633ad8
--- /dev/null
+++ b/net-analyzer/nsat/files/nsat-1.5-strip.patch
@@ -0,0 +1,10 @@
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -37,7 +37,6 @@
+
+ ../nsat:
+ ${GPP} ${CFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB}
+- strip ../nsat
+
+ pidalloc.o:
+ ${GPP} ${CFLAGS} -c pidalloc.cpp
diff --git a/net-analyzer/nsat/files/nsat-1.5-va_list.patch b/net-analyzer/nsat/files/nsat-1.5-va_list.patch
new file mode 100644
index 000000000000..46bdd3bcc121
--- /dev/null
+++ b/net-analyzer/nsat/files/nsat-1.5-va_list.patch
@@ -0,0 +1,27 @@
+--- a/src/Logging.cpp
++++ b/src/Logging.cpp
+@@ -89,16 +89,17 @@
+ if((pi.Foreground) && (out!=NULL))
+ fprintf(stdout, "%s %s ", out, hn);
+
+- va_start(va, fmt);
+-
+- if(fp!=NULL)
++ if(fp!=NULL) {
++ va_start(va, fmt);
+ vfprintf(fp, fmt, va);
++ va_end(va);
++ }
+
+- if((pi.Foreground) && (out!=NULL))
++ if((pi.Foreground) && (out!=NULL)) {
++ va_start(va, fmt);
+ vfprintf(stdout, fmt, va);
+-
+- va_end(va);
+-
++ va_end(va);
++ }
+ if(fp!=NULL)
+ fprintf(fp, "\n");
+