[all-commits] [llvm/llvm-project] 1acbc2: [libc] Define __UTS_NAME_LENGTH for __APPLE__

alfredfo via All-commits all-commits at lists.llvm.org
Sun Aug 13 17:57:19 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1acbc21d46ba3f052471754bfa5860fba652e932
      https://github.com/llvm/llvm-project/commit/1acbc21d46ba3f052471754bfa5860fba652e932
  Author: Alfred Persson Forsberg <cat at catcream.org>
  Date:   2023-08-14 (Mon, 14 Aug 2023)

  Changed paths:
    M libc/include/llvm-libc-types/struct_utsname.h

  Log Message:
  -----------
  [libc] Define __UTS_NAME_LENGTH for __APPLE__

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

Reviewed By: thesamesam

Differential Revision: https://reviews.llvm.org/D157824




More information about the All-commits mailing list