diff --git a/libc/include/llvm-libc-types/CMakeLists.txt b/libc/include/llvm-libc-types/CMakeLists.txt --- a/libc/include/llvm-libc-types/CMakeLists.txt +++ b/libc/include/llvm-libc-types/CMakeLists.txt @@ -38,10 +38,10 @@ add_header(struct_sigaction HDR struct_sigaction.h) add_header(struct_tm HDR struct_tm.h) add_header(struct_utsname HDR struct_utsname.h) -add_header(struct_timespec HDR struct_timespec.h) add_header(thrd_start_t HDR thrd_start_t.h) add_header(thrd_t HDR thrd_t.h DEPENDS .__thread_type) add_header(time_t HDR time_t.h) +add_header(struct_timespec HDR struct_timespec.h DEPENDS .time_t) add_header(tss_t HDR tss_t.h) add_header(tss_dtor_t HDR tss_dtor_t.h) add_header(__atexithandler_t HDR __atexithandler_t.h) diff --git a/libc/include/llvm-libc-types/struct_timespec.h b/libc/include/llvm-libc-types/struct_timespec.h --- a/libc/include/llvm-libc-types/struct_timespec.h +++ b/libc/include/llvm-libc-types/struct_timespec.h @@ -13,6 +13,7 @@ struct timespec { time_t tv_sec; /* Seconds. */ + /* TODO: BIG_ENDIAN may require padding. */ long tv_nsec; /* Nanoseconds. */ }; diff --git a/libc/test/src/time/nanosleep_test.cpp b/libc/test/src/time/nanosleep_test.cpp --- a/libc/test/src/time/nanosleep_test.cpp +++ b/libc/test/src/time/nanosleep_test.cpp @@ -15,9 +15,8 @@ namespace cpp = __llvm_libc::cpp; -// TODO: When we have the code to read clocks, test that time has passed. - -TEST(LlvmLibcNanosleep, sleep) { +TEST(LlvmLibcNanosleep, SmokeTest) { + // TODO: When we have the code to read clocks, test that time has passed. using __llvm_libc::testing::ErrnoSetterMatcher::Succeeds; errno = 0;