error: unknown type name ‘ssize_t’; did you mean ‘_ssize_t’
djw1149 opened this issue · 1 comments
djw1149 commented
Boris Taratine reported: from cygwin on Windows 11 with the latest dnsdbq version:
h-enum -Wconversion -Werror -DWANT_PDNS_DNSDB=1 -DWANT_PDNS_CIRCL=1 `curl-config --cflags` -I/usr/local/include -c tokstr.c
In file included from tokstr.c:13:
tokstr.h:58:1: error: unknown type name ‘ssize_t’; did you mean ‘_ssize_t’?
58 | ssize_t tokstr_next_copy(struct tokstr *, const char *, char *, size_t);
| ^~~~~~~
| _ssize_t
...
I do not have a cygwin system available now, so propose the following change:
diff --git a/defs.h b/defs.h
index e27749c..a007838 100644
--- a/defs.h
+++ b/defs.h
@@ -29,6 +29,7 @@
*/
#ifdef __CYGWIN__
#define CRIPPLED_LIBC 1
+typedef ssize_t _ssize_t;
#endif /* __CYGWIN__ */
If someone could test it on that cygwin, I would appreciate it.
djw1149 commented
Fixed.