Packages: Update Kismet source
parent
134bfcf091
commit
359d19ffb0
|
@ -240,6 +240,9 @@
|
|||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* strerror_r return type */
|
||||
#undef STRERROR_R_T
|
||||
|
||||
/* system config directory */
|
||||
#undef SYSCONF_LOC
|
||||
|
||||
|
|
|
@ -8719,6 +8719,49 @@ $as_echo "failed" >&6; }
|
|||
fi
|
||||
fi
|
||||
|
||||
# How do we do strerror?
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r() return" >&5
|
||||
$as_echo_n "checking for strerror_r() return... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
int r;
|
||||
|
||||
r = strerror_r(1, (char *) NULL, 0);
|
||||
return 0;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_link "$LINENO"; then :
|
||||
strerror_r_int=yes
|
||||
else
|
||||
strerror_r_int=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
if test "$strerror_r_int" = "yes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5
|
||||
$as_echo "int" >&6; }
|
||||
|
||||
$as_echo "#define STRERROR_R_T int" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: char *" >&5
|
||||
$as_echo "char *" >&6; }
|
||||
|
||||
$as_echo "#define STRERROR_R_T char *" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
# How does accept() work on this system?
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for accept() addrlen type" >&5
|
||||
$as_echo_n "checking for accept() addrlen type... " >&6; }
|
||||
|
|
|
@ -456,6 +456,25 @@ if test "$stdint" = "no"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# How do we do strerror?
|
||||
AC_MSG_CHECKING([for strerror_r() return])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
||||
#include <string.h>
|
||||
], [
|
||||
int r;
|
||||
|
||||
r = strerror_r(1, (char *) NULL, 0);
|
||||
return 0;
|
||||
])],[strerror_r_int=yes], [strerror_r_int=no])
|
||||
|
||||
if test "$strerror_r_int" = "yes"; then
|
||||
AC_MSG_RESULT([int])
|
||||
AC_DEFINE(STRERROR_R_T, [int], [strerror_r return type])
|
||||
else
|
||||
AC_MSG_RESULT([char *])
|
||||
AC_DEFINE(STRERROR_R_T, [char *], [strerror_r return type])
|
||||
fi
|
||||
|
||||
# How does accept() work on this system?
|
||||
AC_MSG_CHECKING([for accept() addrlen type])
|
||||
OCFL="$CFLAGS"
|
||||
|
|
|
@ -565,6 +565,9 @@ Pcap_Stream_Packetchain::~Pcap_Stream_Packetchain() {
|
|||
}
|
||||
|
||||
void Pcap_Stream_Packetchain::stop_stream(std::string in_reason) {
|
||||
// Force a lock here to ensure that the stream processor is done when we revoke it
|
||||
local_locker l(&packet_mutex);
|
||||
|
||||
packetchain->RemoveHandler(packethandler_id, CHAINPOS_LOGGING);
|
||||
Pcap_Stream_Ringbuf::stop_stream(in_reason);
|
||||
}
|
||||
|
|
|
@ -915,25 +915,13 @@ std::string kis_strerror_r(int errnum) {
|
|||
char *d_errstr = new char[1024];
|
||||
std::string rs;
|
||||
|
||||
// Deal with the XSI vs GNU versioning & compilers complaining about returns, osx handling, etc.
|
||||
// XSI and GNU define it differently and it's a huge pain.
|
||||
#if defined(__APPLE__) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE)
|
||||
int r;
|
||||
STRERROR_R_T r;
|
||||
r = strerror_r(errnum, d_errstr, 1024);
|
||||
|
||||
rs = std::string(d_errstr);
|
||||
|
||||
delete[] d_errstr;
|
||||
return rs;
|
||||
#else
|
||||
char *r;
|
||||
|
||||
r = strerror_r(errnum, d_errstr, 1024);
|
||||
rs = std::string(r);
|
||||
|
||||
delete[] d_errstr;
|
||||
return rs;
|
||||
#endif
|
||||
}
|
||||
|
||||
double ts_to_double(struct timeval ts) {
|
||||
|
|
Loading…
Reference in New Issue