diff --git a/spec/rubyspec/optional/capi/ext/thread_spec.c b/spec/rubyspec/optional/capi/ext/thread_spec.c index 5ea96fe3d6..78e8183129 100644 --- a/spec/rubyspec/optional/capi/ext/thread_spec.c +++ b/spec/rubyspec/optional/capi/ext/thread_spec.c @@ -4,7 +4,9 @@ #include #include +#if HAVE_UNISTD_H #include +#endif #ifdef __cplusplus extern "C" {