[libc-commits] [libc] d9c135c - [libc] Fix missing include for pthread tests

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Sun Apr 2 08:06:30 PDT 2023


Author: Guillaume Chatelet
Date: 2023-04-02T15:06:15Z
New Revision: d9c135cf3845b5b6eb4be8688559e3de6ce36b13

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

LOG: [libc] Fix missing include for pthread tests

Added: 
    

Modified: 
    libc/test/integration/src/pthread/pthread_equal_test.cpp
    libc/test/integration/src/pthread/pthread_mutex_test.cpp
    libc/test/integration/src/pthread/pthread_name_test.cpp
    libc/test/integration/src/pthread/pthread_once_test.cpp
    libc/test/integration/src/pthread/pthread_test.cpp

Removed: 
    


################################################################################
diff  --git a/libc/test/integration/src/pthread/pthread_equal_test.cpp b/libc/test/integration/src/pthread/pthread_equal_test.cpp
index 37fb4536ea08c..08d89892d22a9 100644
--- a/libc/test/integration/src/pthread/pthread_equal_test.cpp
+++ b/libc/test/integration/src/pthread/pthread_equal_test.cpp
@@ -18,6 +18,7 @@
 #include "test/IntegrationTest/test.h"
 
 #include <pthread.h>
+#include <stdint.h> // uintptr_t
 
 pthread_t child_thread;
 pthread_mutex_t mutex;

diff  --git a/libc/test/integration/src/pthread/pthread_mutex_test.cpp b/libc/test/integration/src/pthread/pthread_mutex_test.cpp
index c00211a94b356..67300872dc60a 100644
--- a/libc/test/integration/src/pthread/pthread_mutex_test.cpp
+++ b/libc/test/integration/src/pthread/pthread_mutex_test.cpp
@@ -17,6 +17,7 @@
 #include "test/IntegrationTest/test.h"
 
 #include <pthread.h>
+#include <stdint.h> // uintptr_t
 
 constexpr int START = 0;
 constexpr int MAX = 10000;

diff  --git a/libc/test/integration/src/pthread/pthread_name_test.cpp b/libc/test/integration/src/pthread/pthread_name_test.cpp
index b5b4dd8f83420..fa227b3074988 100644
--- a/libc/test/integration/src/pthread/pthread_name_test.cpp
+++ b/libc/test/integration/src/pthread/pthread_name_test.cpp
@@ -21,6 +21,7 @@
 
 #include <errno.h>
 #include <pthread.h>
+#include <stdint.h> // uintptr_t
 
 using string_view = __llvm_libc::cpp::string_view;
 

diff  --git a/libc/test/integration/src/pthread/pthread_once_test.cpp b/libc/test/integration/src/pthread/pthread_once_test.cpp
index d3415a6954053..8de28413f8c94 100644
--- a/libc/test/integration/src/pthread/pthread_once_test.cpp
+++ b/libc/test/integration/src/pthread/pthread_once_test.cpp
@@ -18,6 +18,7 @@
 #include "test/IntegrationTest/test.h"
 
 #include <pthread.h>
+#include <stdint.h> // uintptr_t
 
 static constexpr unsigned int NUM_THREADS = 5;
 static __llvm_libc::cpp::Atomic<unsigned int> thread_count;

diff  --git a/libc/test/integration/src/pthread/pthread_test.cpp b/libc/test/integration/src/pthread/pthread_test.cpp
index e7aff2f778a54..fa6a828d9208b 100644
--- a/libc/test/integration/src/pthread/pthread_test.cpp
+++ b/libc/test/integration/src/pthread/pthread_test.cpp
@@ -11,6 +11,7 @@
 #include "test/IntegrationTest/test.h"
 
 #include <pthread.h>
+#include <stdint.h> // uintptr_t
 
 static constexpr int thread_count = 1000;
 static int counter = 0;


        


More information about the libc-commits mailing list