diff --git a/libsync/include/ndk/sync.h b/libsync/include/ndk/sync.h index 49f01e142..ba7d8c4db 100644 --- a/libsync/include/ndk/sync.h +++ b/libsync/include/ndk/sync.h @@ -27,11 +27,14 @@ #define ANDROID_SYNC_H #include +#include #include __BEGIN_DECLS +#if __ANDROID_API__ >= 26 + /* Fences indicate the status of an asynchronous task. They are initially * in unsignaled state (0), and make a one-time transition to either signaled * (1) or error (< 0) state. A sync file is a collection of one or more fences; @@ -88,6 +91,8 @@ static inline struct sync_fence_info* sync_get_fence_info(const struct sync_file /** Free a struct sync_file_info structure */ void sync_file_info_free(struct sync_file_info* info) __INTRODUCED_IN(26); +#endif /* __ANDROID_API__ >= 26 */ + __END_DECLS #endif /* ANDROID_SYNC_H */