This is an archive of the discontinued LLVM Phabricator instance.

[libc] Define __UTS_NAME_LENGTH for __APPLE__
ClosedPublic

Authored by alfredfo on Aug 13 2023, 12:32 PM.

Details

Summary

Before https://github.com/llvm/llvm-project/commit/cae84d8acf5ec7a8f7b9fd2ce33397bcc22c590c all linux checks were incorrectly unix checks. unix being true on macOS systems therefore meant that macOS would use 65 as __UTS_NAME_LENGTH.

This commit correctly specifices __UTS_NAME_LENGTH to match XNU as 256.
https://opensource.apple.com/source/xnu/xnu-201/bsd/sys/utsname.h.auto.html

Diff Detail

Event Timeline

alfredfo created this revision.Aug 13 2023, 12:32 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 13 2023, 12:32 PM
alfredfo requested review of this revision.Aug 13 2023, 12:32 PM
alfredfo updated this revision to Diff 549767.Aug 13 2023, 5:48 PM
alfredfo edited the summary of this revision. (Show Details)

update commit message

thesamesam accepted this revision.Aug 13 2023, 5:56 PM
This revision is now accepted and ready to land.Aug 13 2023, 5:56 PM
This revision was automatically updated to reflect the committed changes.