[libc-commits] [PATCH] D157824: [libc] Define __UTS_NAME_LENGTH for __APPLE__

Sam James via Phabricator via libc-commits libc-commits at lists.llvm.org
Sun Aug 13 17:57:21 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG1acbc21d46ba: [libc] Define __UTS_NAME_LENGTH for __APPLE__ (authored by alfredfo, committed by thesamesam).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157824/new/

https://reviews.llvm.org/D157824

Files:
  libc/include/llvm-libc-types/struct_utsname.h


Index: libc/include/llvm-libc-types/struct_utsname.h
===================================================================
--- libc/include/llvm-libc-types/struct_utsname.h
+++ libc/include/llvm-libc-types/struct_utsname.h
@@ -9,8 +9,10 @@
 #ifndef __LLVM_LIBC_TYPES_STRUCT_UTSNAME_H__
 #define __LLVM_LIBC_TYPES_STRUCT_UTSNAME_H__
 
-#ifdef __linux__
+#if defined(__linux__)
 #define __UTS_NAME_LENGTH 65
+#elif defined(__APPLE__)
+#define __UTS_NAME_LENGTH 256
 #else
 // Arbitray default. Should be specialized for each platform.
 #define __UTS_NAME_LENGTH 1024


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157824.549769.patch
Type: text/x-patch
Size: 563 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230814/1ef06718/attachment.bin>


More information about the libc-commits mailing list