Hello,
I'm using
OpenBSD 4.0 (GENERIC) #0: Sun Nov 5 02:30:34 CET 2006
gcc version 3.3.5
Compilation microdc2-0.13.0 gives me these errors.
In file included from user.c:23:
/usr/include/netinet/in.h:136: error: syntax error before "in_addr_t"
/usr/include/netinet/in.h:213: error: syntax error before "u_int8_t"
/usr/include/netinet/in.h:217: error: syntax error before "int8_t"
/usr/include/netinet/in.h:232: error: syntax error before "int8_t"
In file included from /usr/include/netinet/in.h:552,
from user.c:23:
/usr/include/netinet6/in6.h:118: error: syntax error before "u_int8_t"
/usr/include/netinet6/in6.h:140: error: syntax error before "u_int8_t"
/usr/include/netinet6/in6.h:145: error: syntax error before "u_int32_t"
/usr/include/netinet6/in6.h:673: error: syntax error before '*' token
/usr/include/netinet6/in6.h:675: error: syntax error before '*' token
/usr/include/netinet6/in6.h:676: error: syntax error before "u_int8_t"
/usr/include/netinet6/in6.h:677: error: syntax error before "u_int8_t"
/usr/include/netinet6/in6.h:679: error: syntax error before
"inet6_rthdr_space"
user.c: In function `user_handle_command':
user.c:962: warning: passing arg 2 of `libiconv' from incompatible
pointer type
user.c:962: warning: passing arg 3 of `libiconv' from incompatible
pointer type
user.c:962: warning: passing arg 5 of `libiconv' from incompatible
pointer type
----------
$ grep -n netinet/in.h src/user.c
23:#include <netinet/in.h> /* ? */
31:#include <netinet/in.h> /* ? */
----------
Is there any reason, why netinet/in.h is twiced included?
So, patch it.
--- microdc2-0.13.0.orig/src/user.c Mon Nov 13 19:09:01 2006
+++ microdc2-0.13.0/src/user.c Mon Nov 13 19:10:35 2006
@@ -20,7 +20,6 @@
#include <config.h>
#include <assert.h> /* ? */
-#include <netinet/in.h> /* ? */
#include <unistd.h> /* POSIX */
#include <sys/types.h> /* ? */
#include <sys/stat.h> /* ? */
----------
make... now I give this error:
hash.c: In function `hash_main':
hash.c:71: error: storage size of `st' isn't known
hash.c:80: warning: implicit declaration of function `stat'
hash.c:71: warning: unused variable `st'
Missing header files sys/stat.h in hash.c
So, patch it.
--- microdc2-0.13.0.orig/src/hash.c Mon Nov 13 19:09:01 2006
+++ microdc2-0.13.0/src/hash.c Mon Nov 13 19:10:55 2006
@@ -24,6 +24,7 @@
#include <errno.h>
#include <sys/time.h>
#include <sys/resource.h>
+#include <sys/stat.h>
#include "gettext.h" /* Gnulib/GNU gettext */
#define _(s) gettext(s)
----------
Now, make run fine.
_______________________________________________
microdc-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/microdc-devel