Rounds size up to the alignment of control message data: 4 bytes on macOS, 8 elsewhere. A negative size, or one too
large to round, fails an assertion.
assert(CMSG_ALIGN(0) == 0);
assert(CMSG_ALIGN(1) % 4 == 0);
assert(CMSG_ALIGN(CMSG_ALIGN(5)) == CMSG_ALIGN(5));Doesn't run in the browser (only on linux, macos).
CMSG_ALIGN :: (size: int) -> int
Rounds size up to the alignment of control message data: 4 bytes on macOS, 8 elsewhere. A negative size, or one too
large to round, fails an assertion.
Parameters
- size: int
Returns
- int
assert(CMSG_ALIGN(0) == 0);
assert(CMSG_ALIGN(1) % 4 == 0);
assert(CMSG_ALIGN(CMSG_ALIGN(5)) == CMSG_ALIGN(5));Doesn't run in the browser (only on linux, macos).