Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicting types for 'uvwasi_serdes_read_uint{32,16,8}_t' (from #145

Closed
triaxx opened this issue Jul 29, 2020 · 3 comments · Fixed by #146
Closed

Conflicting types for 'uvwasi_serdes_read_uint{32,16,8}_t' (from #145

triaxx opened this issue Jul 29, 2020 · 3 comments · Fixed by #146

Comments

@triaxx
Copy link

triaxx commented Jul 29, 2020

At least NetBSD 8.2 is subject to a build failure for nodejs 14.6.0: nodejs/node#34510. @addaleax provides a patch that fixes the issue:

diff --git a/deps/uvwasi/include/wasi_serdes.h b/deps/uvwasi/include/wasi_serdes.h
index f927b82bac9c..746fb72b123e 100644
--- a/deps/uvwasi/include/wasi_serdes.h
+++ b/deps/uvwasi/include/wasi_serdes.h
@@ -9,17 +9,16 @@
   void uvwasi_serdes_write_##name(void* ptr, size_t offset, type value);      \
   type uvwasi_serdes_read_##name(const void* ptr, size_t offset);             \
 
-#define BASIC_TYPE(type) BASIC_TYPE_(type, type)
 #define BASIC_TYPE_UVWASI(type) BASIC_TYPE_(type, uvwasi_##type)
 
 #define UVWASI_SERDES_SIZE_uint8_t sizeof(uint8_t)
-BASIC_TYPE(uint8_t)
+BASIC_TYPE_(uint8_t, uint8_t)
 #define UVWASI_SERDES_SIZE_uint16_t sizeof(uint16_t)
-BASIC_TYPE(uint16_t)
+BASIC_TYPE_(uint16_t, uint16_t)
 #define UVWASI_SERDES_SIZE_uint32_t sizeof(uint32_t)
-BASIC_TYPE(uint32_t)
+BASIC_TYPE_(uint32_t, uint32_t)
 #define UVWASI_SERDES_SIZE_uint64_t sizeof(uint64_t)
-BASIC_TYPE(uint64_t)
+BASIC_TYPE_(uint64_t, uint64_t)
 
 #define UVWASI_SERDES_SIZE_advice_t sizeof(uvwasi_advice_t)
 BASIC_TYPE_UVWASI(advice_t)
@cjihrig
Copy link
Collaborator

cjihrig commented Jul 29, 2020

@triaxx have you tried this patch locally? If so, did it work? I'm just asking because NetBSD isn't tested in the CI.

@triaxx
Copy link
Author

triaxx commented Jul 29, 2020

Argh, I tested it but on NetBSD 9.0 that is not concerned by the issue. I need to reboot the box this evening to test 8.2.

@triaxx
Copy link
Author

triaxx commented Jul 30, 2020

@cjihrig the patch of @addaleax fixes the issue on NetBSD 8.2 too.

cjihrig pushed a commit that referenced this issue Aug 1, 2020
This commit removes a macro, and fixes compilation errors on
certain platforms such as NetBSD 8.2.

Refs: nodejs/node#34510
Fixes: #145
cjihrig pushed a commit that referenced this issue Aug 2, 2020
This commit removes a macro, and fixes compilation errors on
certain platforms such as NetBSD 8.2.

Refs: nodejs/node#34510
Fixes: #145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants