diff --git a/README.md b/README.md
index 4e8822e..f457529 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@ int main(void) {
## API
-The WASI API is versioned. This documentation is based on [snapshot_0][].
+The WASI API is versioned. This documentation is based on [snapshot_1][].
`uvwasi` implements the WASI system call API with the following
additions/modifications:
@@ -1918,7 +1918,7 @@ Members:
The address and length of the buffer to be filled.
-### `uvwasi_linkcount_t` (`uint32_t`)
+### `uvwasi_linkcount_t` (`uint64_t`)
Number of hard links to an inode.
@@ -2373,10 +2373,6 @@ Members:
- **`u.clock`**
- - [\_\_wasi\_userdata\_t](#userdata) identifier
-
- The user-defined unique identifier of the clock.
-
- [\_\_wasi\_clockid\_t](#clockid) clock\_id
The clock against which to compare the timestamp.
@@ -2438,4 +2434,4 @@ Possible values:
[WASI]: https://github.com/WebAssembly/WASI
[libuv]: https://github.com/libuv/libuv
-[snapshot_0]: https://github.com/WebAssembly/WASI/blob/master/phases/old/snapshot_0/docs/wasi_unstable.md
+[snapshot_1]: https://github.com/WebAssembly/WASI/blob/master/phases/snapshot/docs/wasi_unstable_preview1.md
diff --git a/app.c b/app.c
index a233f2b..9a5eaca 100644
--- a/app.c
+++ b/app.c
@@ -26,7 +26,7 @@ int main(void) {
assert(UVWASI_VERSION_HEX == 1);
assert(strcmp(UVWASI_VERSION_STRING, "0.0.2") == 0);
- assert(strcmp(UVWASI_VERSION_WASI, "snapshot_0") == 0);
+ assert(strcmp(UVWASI_VERSION_WASI, "snapshot_1") == 0);
uvw = &uvwasi;
init_options.fd_table_size = 3;
diff --git a/include/uvwasi.h b/include/uvwasi.h
index 112b8dd..3e57f7f 100644
--- a/include/uvwasi.h
+++ b/include/uvwasi.h
@@ -20,7 +20,7 @@ extern "C" {
#define UVWASI_VERSION_STRING UVWASI_STRINGIFY(UVWASI_VERSION_MAJOR) "." \
UVWASI_STRINGIFY(UVWASI_VERSION_MINOR) "." \
UVWASI_STRINGIFY(UVWASI_VERSION_PATCH)
-#define UVWASI_VERSION_WASI "snapshot_0"
+#define UVWASI_VERSION_WASI "snapshot_1"
typedef void* (*uvwasi_malloc)(size_t size, void* mem_user_data);
typedef void (*uvwasi_free)(void* ptr, void* mem_user_data);
diff --git a/include/wasi_types.h b/include/wasi_types.h
index 34b5291..ec10136 100644
--- a/include/wasi_types.h
+++ b/include/wasi_types.h
@@ -155,7 +155,7 @@ typedef struct uvwasi_iovec_s {
size_t buf_len;
} uvwasi_iovec_t;
-typedef uint32_t uvwasi_linkcount_t;
+typedef uint64_t uvwasi_linkcount_t;
typedef uint32_t uvwasi_lookupflags_t; /* Bitfield */
#define UVWASI_LOOKUP_SYMLINK_FOLLOW (1 << 0)
@@ -266,7 +266,6 @@ typedef struct uvwasi_subscription_s {
uvwasi_eventtype_t type;
union {
struct {
- uvwasi_userdata_t identifier;
uvwasi_clockid_t clock_id;
uvwasi_timestamp_t timeout;
uvwasi_timestamp_t precision;
@@ -316,8 +315,8 @@ typedef struct uvwasi_event_s {
} uvwasi_event_t;
typedef uint8_t uvwasi_whence_t;
-#define UVWASI_WHENCE_CUR 0
-#define UVWASI_WHENCE_END 1
-#define UVWASI_WHENCE_SET 2
+#define UVWASI_WHENCE_SET 0
+#define UVWASI_WHENCE_CUR 1
+#define UVWASI_WHENCE_END 2
#endif /* __UVWASI_WASI_TYPES_H__ */