Merge "Remove unused function" into main
diff --git a/libc/bionic/signal.cpp b/libc/bionic/signal.cpp
index 5979ed7..77e6acf 100644
--- a/libc/bionic/signal.cpp
+++ b/libc/bionic/signal.cpp
@@ -288,16 +288,14 @@
}
int sigwait64(const sigset64_t* set, int* sig) {
- while (true) {
- // __rt_sigtimedwait can return EAGAIN or EINTR, we need to loop
- // around them since sigwait is only allowed to return EINVAL.
- int result = sigtimedwait64(set, nullptr, nullptr);
- if (result >= 0) {
- *sig = result;
- return 0;
- }
- if (errno != EAGAIN && errno != EINTR) return errno;
- }
+ // sigtimedwait64() doesn't fail with EINVAL on Linux,
+ // and EAGAIN can only happen with a timeout,
+ // so the error reporting here is effectively dead code.
+ ErrnoRestorer errno_restorer;
+ int result = TEMP_FAILURE_RETRY(sigtimedwait64(set, nullptr, nullptr));
+ if (result == -1) return errno;
+ *sig = result;
+ return 0;
}
int sigwaitinfo(const sigset_t* set, siginfo_t* info) {
diff --git a/libc/include/malloc.h b/libc/include/malloc.h
index ba68401..bb4916a 100644
--- a/libc/include/malloc.h
+++ b/libc/include/malloc.h
@@ -122,7 +122,11 @@
* [malloc_usable_size(3)](https://man7.org/linux/man-pages/man3/malloc_usable_size.3.html)
* returns the actual size of the given heap block.
*/
-__nodiscard size_t malloc_usable_size(const void* _Nullable __ptr);
+__nodiscard size_t malloc_usable_size(const void* _Nullable __ptr)
+#if defined(_FORTIFY_SOURCE)
+ __clang_error_if(_FORTIFY_SOURCE == 3, "malloc_usable_size() and _FORTIFY_SOURCE=3 are incompatible")
+#endif
+;
#define __MALLINFO_BODY \
/** Total number of non-mmapped bytes currently allocated from OS. */ \
diff --git a/tests/Android.bp b/tests/Android.bp
index 51afa55..72236ab 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -1412,15 +1412,7 @@
cc_defaults {
name: "bionic_compile_time_tests_defaults",
- enabled: false,
- target: {
- linux_x86: {
- enabled: true,
- },
- linux_x86_64: {
- enabled: true,
- },
- },
+ enabled: true,
clang_verify: true,
cflags: [
"-Wall",