[libc-commits] [libc] 95dc29a - [libc] Fix including 'libc_errno.h' incorrectly

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue Apr 25 11:33:16 PDT 2023


Author: Joseph Huber
Date: 2023-04-25T13:32:17-05:00
New Revision: 95dc29a0568f5039d79d5b5a8ce92d0aca9d6ac1

URL: https://github.com/llvm/llvm-project/commit/95dc29a0568f5039d79d5b5a8ce92d0aca9d6ac1
DIFF: https://github.com/llvm/llvm-project/commit/95dc29a0568f5039d79d5b5a8ce92d0aca9d6ac1.diff

LOG: [libc] Fix including 'libc_errno.h' incorrectly

Summary:
This causes problems when included. Fix this to hopefully get the bots
working again.

Added: 
    

Modified: 
    libc/src/errno/libc_errno.cpp

Removed: 
    


################################################################################
diff  --git a/libc/src/errno/libc_errno.cpp b/libc/src/errno/libc_errno.cpp
index 8cf77a8f202c..a52e3afbbf1a 100644
--- a/libc/src/errno/libc_errno.cpp
+++ b/libc/src/errno/libc_errno.cpp
@@ -7,10 +7,15 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/__support/macros/properties/architectures.h"
-#include "libc_errno.h"
 
 namespace __llvm_libc {
 
+#ifdef LIBC_TARGET_ARCH_IS_GPU
+struct ErrnoConsumer {
+  void operator=(int) {}
+};
+#endif
+
 extern "C" {
 #ifdef LIBC_COPT_PUBLIC_PACKAGING
 // TODO: Declare __llvmlibc_errno only under LIBC_COPT_PUBLIC_PACKAGING and


        


More information about the libc-commits mailing list