[compiler-rt] 34d244a - Fix rtsan build with musl (#119674)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 05:57:44 PST 2024
Author: Yi Kong
Date: 2024-12-12T22:57:41+09:00
New Revision: 34d244a94195dbeb626573c9b2e388dc574f9300
URL: https://github.com/llvm/llvm-project/commit/34d244a94195dbeb626573c9b2e388dc574f9300
DIFF: https://github.com/llvm/llvm-project/commit/34d244a94195dbeb626573c9b2e388dc574f9300.diff
LOG: Fix rtsan build with musl (#119674)
fd_set is defined by `sys/select.h`. On musl, this header is not
transitively included by the other headers.
Failure message:
```
compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp:761:37: error: unknown type name 'fd_set'; did you mean 'fd_t'?
761 | INTERCEPTOR(int, pselect, int nfds, fd_set *readfds, fd_set *writefds,
| ^~~~~~
| fd_t
```
Added:
Modified:
compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp b/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
index f076c7eae9a226..f000deb3039a8c 100644
--- a/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
+++ b/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
@@ -46,6 +46,7 @@ void OSSpinLockLock(volatile OSSpinLock *__lock);
#include <pthread.h>
#include <stdarg.h>
#include <stdio.h>
+#include <sys/select.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <time.h>
More information about the llvm-commits
mailing list