Project

General

Profile

Bug #7005 » solaris.patch

Martin Rehak, 05/03/2024 08:10 AM

View differences:

src/source-pcap-file-directory-helper.c 2024-01-04 16:41:19.843528082 +0100 → src/source-pcap-file-directory-helper.c 2024-01-04 16:42:29.054578407 +0100
PendingFile *file_to_add = NULL;
while ((dir = readdir(pv->directory)) != NULL) {
#ifndef OS_WIN32
#if defined(DT_REG)
if (dir->d_type != DT_REG) {
continue;
}
-- a/src/util-path.c 2024-01-08 17:18:59.712020322 +0100
++ b/src/util-path.c 2024-01-08 17:19:23.262288062 +0100
......
*/
bool SCIsRegularDirectory(const struct dirent *const dir_entry)
{
#ifndef OS_WIN32
#if !defined(OS_WIN32) && !defined (__sun)
if ((dir_entry->d_type == DT_DIR) &&
(strcmp(dir_entry->d_name, ".") != 0) &&
(strcmp(dir_entry->d_name, "..") != 0)) {
......
*/
bool SCIsRegularFile(const struct dirent *const dir_entry)
{
#ifndef OS_WIN32
#if defined(DT_REG)
return dir_entry->d_type == DT_REG;
#endif
return false;
-------------------------------------------------------------------------------
src/suricata.c
#endif
if (limit_nproc) {
#if defined(HAVE_SYS_RESOURCE_H)
#if defined(HAVE_SYS_RESOURCE_H) && defined(RLIMIT_NPROC)
#ifdef linux
if (geteuid() == 0) {
SCLogWarning("setrlimit has no effet when running as root.");
-------------------------------------------------------------------------------
src/main.c 2024-02-20 10:09:38.161133595 +0100 → src/main.c 2024-02-20 10:13:06.734861565 +0100
int main(int argc, char **argv)
{
/*
* 'ta 6' tells the kernel to synthesize any unaligned accesses this process
* makes, instead of just signalling an error and terminating the process.
*/
#ifdef __sparc
__asm("ta 6");
#endif
return SuricataMain(argc, argv);
}
-------------------------------------------------------------------------------
src/util-syslog.c 2024-01-09 09:59:27.550326763 +0100 → src/util-syslog.c 2024-01-09 10:00:06.581732562 +0100
{ "authpriv", LOG_AUTHPRIV },
{ "cron", LOG_CRON },
{ "daemon", LOG_DAEMON },
#if defined(LOG_FTP)
{ "ftp", LOG_FTP },
#endif
{ "kern", LOG_KERN },
{ "lpr", LOG_LPR },
{ "mail", LOG_MAIL },
-------------------------------------------------------------------------------
-- a/src/threads.h.orig 2024-01-04 10:02:36.882268430 +0100
++ b/src/threads.h 2024-01-04 10:02:46.759239772 +0100
......
#else
#define SCSetThreadName(n) ({ \
strlcpy(t_thread_name, n, sizeof(t_thread_name)); \
}
})
#endif
-------------------------------------------------------------------------------
src/util-time.c 2024-01-09 10:01:31.542826576 +0100 → src/util-time.c 2024-01-09 10:02:33.835783612 +0100
result += tp->tm_min;
result *= 60;
result += tp->tm_sec;
#ifndef OS_WIN32
#if !defined(OS_WIN32) && !defined(__sun)
if (tp->tm_gmtoff)
result -= tp->tm_gmtoff;
#endif
......
tp->tm_hour = tp->tm_min = tp->tm_sec = 0;
tp->tm_year = tp->tm_mon = tp->tm_mday = tp->tm_wday = INT_MIN;
tp->tm_isdst = -1;
#ifndef OS_WIN32
#if !defined(OS_WIN32) && !defined(__sun)
tp->tm_gmtoff = 0;
tp->tm_zone = NULL;
#endif
    (1-1/1)