pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lang/nodejs-14.6.0 build failure on NetBSD 8.2
Dear pkgsrc users,
I created a bug report upstream: https://github.com/nodejs/node/issues/34510
The error is due to a macro from deps/uvwasi/include/wasi_serdes.h that provides declarations of function prototype according to type:
#define BASIC_TYPE_(name, type) \
void uvwasi_serdes_write_##name(void* ptr, size_t offset, type value); \
type uvwasi_serdes_read_##name(const void* ptr, size_t offset); \
Since (at least) NetBSD 8.2 defines in /usr/include/stdint.h:
#ifndef uint8_t
typedef __uint8_t uint8_t;
#define uint8_t __uint8_t
#endif
the resulting declared functions are uvwasi_serdes_{write,read}___uint8_t() instead of uvwasi_serdes_{write,read}_uint8_t() and the compilation errors follow.
I suggest the patch below but I am open to any remark or suggestion that would allow us to provide a solution which respects best practices:
$NetBSD$
--- deps/uvwasi/include/wasi_serdes.h.orig 2020-07-20 22:18:45.000000000 +0000
+++ deps/uvwasi/include/wasi_serdes.h
@@ -13,12 +13,24 @@
#define BASIC_TYPE_UVWASI(type) BASIC_TYPE_(type, uvwasi_##type)
#define UVWASI_SERDES_SIZE_uint8_t sizeof(uint8_t)
+#ifdef uint8_t
+#undef uint8_t
+#endif
BASIC_TYPE(uint8_t)
#define UVWASI_SERDES_SIZE_uint16_t sizeof(uint16_t)
+#ifdef uint16_t
+#undef uint16_t
+#endif
BASIC_TYPE(uint16_t)
#define UVWASI_SERDES_SIZE_uint32_t sizeof(uint32_t)
+#ifdef uint32_t
+#undef uint32_t
+#endif
BASIC_TYPE(uint32_t)
#define UVWASI_SERDES_SIZE_uint64_t sizeof(uint64_t)
+#ifdef uint64_t
+#undef uint64_t
+#endif
BASIC_TYPE(uint64_t)
#define UVWASI_SERDES_SIZE_advice_t sizeof(uvwasi_advice_t)
Home |
Main Index |
Thread Index |
Old Index