[libc-commits] [PATCH] D157824: [libc] Define __UTS_NAME_LENGTH for __APPLE__
Alfred Persson Forsberg via Phabricator via libc-commits
libc-commits at lists.llvm.org
Sun Aug 13 12:32:38 PDT 2023
alfredfo created this revision.
alfredfo added reviewers: michaelrj, thesamesam.
Herald added subscribers: libc-commits, krytarowski.
Herald added projects: libc-project, All.
alfredfo requested review of this revision.
Matches this: https://opensource.apple.com/source/xnu/xnu-201/bsd/sys/utsname.h.auto.html
Repository:
rG LLVM Github Monorepo
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.549744.patch
Type: text/x-patch
Size: 563 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230813/7886d28d/attachment.bin>
More information about the libc-commits
mailing list