Bug#559764: dico: FTBFS on GNU/kFreeBSD: undeclared ENODATA
Package: dico
Version: 2.0-5
Severity: important
Tags: patch
User: debian-bsd@lists.debian.org
Usertags: kfreebsd
Hi,
your package FTBFS on GNU/kFreeBSD:
| libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../gnu -I../gnu -g -O2 -c utf8.c -fPIC -DPIC -o .libs/utf8.o
| utf8.c: In function 'utf8_mbtowc_internal':
| utf8.c:1617: error: 'ENODATA' undeclared (first use in this function)
| utf8.c:1617: error: (Each undeclared identifier is reported only once
| utf8.c:1617: error: for each function it appears in.)
| make[4]: *** [utf8.lo] Error 1
Full logs available at:
https://buildd.debian.org/status/package.php?suite=unstable&p=dico
Since there's no ENODATA on GNU/kFreeBSD, I tried to use a similar error
code but I'm not sure it's the best. I'm Cc-ing debian-bsd@ to have more
opinions on that. I think we already used ENOATTR once but that was in
another context.
Thanks for considering.
Mraw,
KiBi.
--- a/lib/utf8.c
+++ b/lib/utf8.c
@@ -1608,6 +1608,11 @@ utf8_wctomb (unsigned char *r, unsigned
return count;
}
+/* Workaround for GNU/kFreeBSD, better implementation welcome. */
+#ifndef ENODATA
+#define ENODATA EBADMSG
+#endif
+
int
utf8_mbtowc_internal (void *data, int (*read) (void*), unsigned int *pwc)
{
Reply to: