Declare _POSIX_SOURCE to ensure kill(2) is declared
ClosedPublic

Authored by mpyne on Jul 10 2017, 12:10 AM.

Details

Summary

Believe it or not, but the kill(2) system call is not specified to be available by default in C. It's part of BSD, POSIX, Single UNIX Spec, etc., but you do have to declare one of the various feature test macros for a strict libc (such as musl) to expose the declaration.

The fix here was simply to define _POSIX_SOURCE before including the various C stdlib or UNIX headers.

Test Plan

kinit now compiles with musl libc
kinit still compiles with glibc on Linux

Diff Detail

Repository
R303 KInit
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mpyne created this revision.Jul 10 2017, 12:10 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptJul 10 2017, 12:10 AM
This revision was automatically updated to reflect the committed changes.