fix: 移除 glibc 内部 bits/* 头文件提升可移植性

time.c 与 runtime.c 中误引的 <bits/time.h>、<bits/types/struct_itimerspec.h>、
<bits/types/sigset_t.h> 是 glibc 实现细节头文件,非 glibc 环境(bionic、musl 等)
不提供,导致跨平台编译失败。

这些符号(CLOCK_MONOTONIC / TFD_CLOEXEC / struct itimerspec / sigset_t)均由
已包含的公开标准头文件 <time.h>、<sys/timerfd.h>、<signal.h> 统一提供,
删除冗余引用后 glibc 与非 glibc 环境均可正常编译
This commit is contained in:
2026-07-13 03:32:11 +08:00
parent 6b75cda128
commit 6a227b0497
2 changed files with 0 additions and 3 deletions

View File

@@ -1,7 +1,5 @@
#include "base/time.h" #include "base/time.h"
#include <bits/time.h>
#include <bits/types/struct_itimerspec.h>
#include <errno.h> #include <errno.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>

View File

@@ -1,6 +1,5 @@
#include "runtime/runtime.h" #include "runtime/runtime.h"
#include <bits/types/sigset_t.h>
#include <dlfcn.h> #include <dlfcn.h>
#include <signal.h> #include <signal.h>
#include <stddef.h> #include <stddef.h>