Skip to content

Commit 29dec35

Browse files
[libc] NFC: Fix build on systems that don't have linux/time_types.h
This broke some bots that don't have linux/time_types.h available (libc-x86_64-debian-*). The header is needed because of __kernel_timespec, and since this is only needed when SYS_sched_rr_get_interval_time64 is available, guarding the include should fix the broken bot.
1 parent 51f91e1 commit 29dec35

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libc/src/sched/linux/sched_rr_get_interval.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@
1212
#include "src/__support/common.h"
1313
#include "src/errno/libc_errno.h"
1414

15-
#include <linux/time_types.h> // For __kernel_timespec.
1615
#include <sys/syscall.h> // For syscall numbers.
1716

17+
#ifdef SYS_sched_rr_get_interval_time64
18+
#include <linux/time_types.h> // For __kernel_timespec.
19+
#endif
20+
1821
namespace __llvm_libc {
1922

2023
LLVM_LIBC_FUNCTION(int, sched_rr_get_interval,

0 commit comments

Comments
 (0)