Conversation
|
NOTE: This PR may contain new authors. |
|
Argh, I guess it will need a rebase to get green CI |
|
I'd like to see this split out into different commits, not just a general "Solaris porting changes". Essentially the list of changes in the PR message body has the logical separation I think would be appropriate for the commits. Esp the alignment commit would need to have a bit more explanation of what it does and why. |
victorjulien
left a comment
There was a problem hiding this comment.
Code itself looks good, git needs to a cleanup.
Also needs a rebase again.
|
Hi Victor, so could you help me and list what exact steps should I do to make all this pass? I have done the rebase twice without success. Did I something wrong, please? Sorry, I am not keen on github development, but I still would like to make these change to get to the repo. Regards, |
|
You need to do something like And then create a new PR Also have the commit message have a title like See https://docs.suricata.io/en/latest/devguide/contributing/code-submission-process.html |
Guard DT_REG usage so directory walking code still builds on platforms where dirent does not expose d_type or DT_REG, such as Solaris.
Replace uses of the non-standard sun macro with __sun and use Solaris byte swap helpers from <sys/byteorder.h>. This keeps the Solaris-specific code paths reachable when building with standard-conforming toolchains.
Skip tm_gmtoff and tm_zone initialization on Solaris where those struct tm members are not available.
Only expose the ftp facility when the platform syslog headers define LOG_FTP.
Call a SPARC-specific helper during pre-init so the kernel emulates unaligned accesses for this process instead of terminating on alignment faults. This matches the Solaris/SPARC portability fix that motivated the original patch.
Only use RLIMIT_NPROC when the platform exposes that resource limit constant.
|
I rebased this work onto current upstream main, squashed it into a single commit as requested, and opened a new PR with the updated branch. Superseded by: #15513 |
Ticket: 7005
Make sure these boxes are checked accordingly before submitting your Pull Request -- thank you.
Contribution style:
https://docs.suricata.io/en/latest/devguide/contributing/contribution-process.html
Our Contribution agreements:
https://suricata.io/about/contribution-agreement/ (note: this is only required once)
Changes (if applicable):
https://redmine.openinfosecfoundation.org/projects/suricata/issues
Link to ticket: https://redmine.openinfosecfoundation.org/issues/7005
Describe changes:
src/source-pcap-file-directory-helper.c, src/util-path.c: Solaris doesn't define d_type dirent member and DT_REG type.
src/suricata.c: Fix alignment problems on SPARC. Based on similar fixes found at:
https://lists.debian.org/debian-sparc/2012/01/msg00012.html
and:
https://www.winehq.org/pipermail/wine-patches/2011-February/098547.html.
src/suricata.c: Only Linux and the BSDs support the RLIMIT_NPROC resource limit.
src/util-syslog.c: Solaris syslog.h doesn't define LOG_FTP.
src/util-time.c: Solaris tm doesn't define tm_gmtoff member.
sun macro replacement with __sun. sun is not defined when C++ standard is used.