6.3 compiler problem

Using 6.3 x86 self-hosted & gcc 3.3.1

If warnings are turned on and a program includes:
#include <arpa/inet.h>

you get the following errors:
In file included from /usr/qnx630/target/qnx6/usr/include/arpa/inet.h:79,
from …/communications_thread.cc:23:
/usr/qnx630/target/qnx6/usr/include/sys/types.h:263: error: size_t' not declared In file included from /usr/qnx630/target/qnx6/usr/include/strings.h:14, from ../communications_thread.cc:24: /usr/qnx630/target/qnx6/usr/include/string.h:87: error: syntax error before (’
token
/usr/qnx630/target/qnx6/usr/include/string.h:88: error: no type size_t' in
std’
/usr/qnx630/target/qnx6/usr/include/string.h:88: error: parse error before )' token /usr/qnx630/target/qnx6/usr/include/string.h:89: error: no type size_t’ in std' /usr/qnx630/target/qnx6/usr/include/string.h:89: error: parse error before)’

I believe that an include file should include anything that it is dependant on.
Can this be fixed?

But it does include <sys/types.h> :slight_smile:

The following should get you going. I’ll try
to get this in the next patch.

-seanb


*** /usr/include/netinet6/in6.h Wed May 5 12:43:00 2004
— in6.h Wed Jul 14 15:32:25 2004


*** 645,654 ****
— 645,656 ----

#if defined(__EXT_BSD)

  • _C_STD_BEGIN
    #if defined(__SIZE_T)
    typedef __SIZE_T size_t;
    #undef __SIZE_T
    #endif
  • _C_STD_END

__BEGIN_DECLS
struct cmsghdr;


*** 661,667 ****
— 663,671 ----
extern int inet6_option_next __P((const struct cmsghdr *, uint8_t **));
extern int inet6_option_find __P((const struct cmsghdr *, uint8_t **, int));

  • _C_STD_BEGIN
    extern size_t inet6_rthdr_space __P((int, int));
  • _C_STD_END
    extern struct cmsghdr *inet6_rthdr_init __P((void *, int));
    extern int inet6_rthdr_add __P((struct cmsghdr *, const struct in6_addr *,
    unsigned int));

Bill Caroselli <qtps@earthlink.net> wrote:

Using 6.3 x86 self-hosted & gcc 3.3.1

If warnings are turned on and a program includes:
#include <arpa/inet.h

you get the following errors:
In file included from /usr/qnx630/target/qnx6/usr/include/arpa/inet.h:79,
from …/communications_thread.cc:23:
/usr/qnx630/target/qnx6/usr/include/sys/types.h:263: error: size_t' not declared In file included from /usr/qnx630/target/qnx6/usr/include/strings.h:14, from ../communications_thread.cc:24: /usr/qnx630/target/qnx6/usr/include/string.h:87: error: syntax error before (’
token
/usr/qnx630/target/qnx6/usr/include/string.h:88: error: no type size_t' in
std’
/usr/qnx630/target/qnx6/usr/include/string.h:88: error: parse error before )' token /usr/qnx630/target/qnx6/usr/include/string.h:89: error: no type size_t’ in std' /usr/qnx630/target/qnx6/usr/include/string.h:89: error: parse error before)’

I believe that an include file should include anything that it is dependant on.
Can this be fixed?