-
Notifications
You must be signed in to change notification settings - Fork 1k
utils.c: include <signal.h> for siginfo_t
#7517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
POSIX says: > The <signal.h> header shall define the siginfo_t type as a structure So <sys/wait.h> is not enough to see the definition (not just a forward declaration) of siginfo_t.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7517 +/- ##
=======================================
Coverage 98.97% 98.97%
=======================================
Files 87 87
Lines 16740 16740
=======================================
Hits 16568 16568
Misses 172 172 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
NEWS.md
Outdated
|
|
||
| ### BUG FIXES | ||
|
|
||
| 1. Fixed the compilation failure on FreeBSD due to an `#include` directive missing in v1.18.0, [#7516](https://github.com/rdatatable/data.table/issues/7516). Thanks to @jszhao for the report and @aitap for the fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess a better description is "failure in some strict environments, e.g. FreeBSD, due..." WDYT?
Maybe worth mentioning the POSIX compliance aspect too?
|
Generated via commit baaf8ca Download link for the artifact containing the test results: ↓ atime-results.zip
|
| @@ -1,6 +1,7 @@ | |||
| #ifndef _WIN32 | |||
| # define _POSIX_C_SOURCE 200809L // required for POSIX (not standard C) features in is_direct_child e.g. 'siginfo_t' | |||
| # include <sys/wait.h> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200809L
# undef _POSIX_C_SOURCE
# define _POSIX_C_SOURCE 200809L
# endif
for robustness

POSIX says:
So
<sys/wait.h>is not enough to see the definition (not just a forward declaration) ofsiginfo_t.Fixes: #7516
Tested manually on FreeBSD:
Details
...and OpenBSD:
Details
Also tested on GNU/Linux with
PKG_CFLAGS=--std=c99.@jszhao, could you please pull from this branch (
posix_siginfo_t) and runR CMD build, then install the resulting tarball?