[Date Prev][Date Next] [Chronological] [Thread] [Top]

Error building 2.1.8 on IRIX 6.5 (ITS#2204)



Full_Name: Albert Chin-A-Young
Version: 2.1.8
OS: IRIX 6.5
URL: 
Submission from: (NULL) (67.89.104.162)


I'm getting the following error when building 2.1.8 on IRIX 6.5 with the SGI C
compiler:
cc -O2 -std1 -I../../../include -I../../../include -I.. -I./..
-I/opt/TWWfsw/tcpwrap/include -I/opt/TWWfsw/libsasl21/include
-I/opt/TWWfsw/libopenssl09/include -I/opt/TWWfsw/libdb41/include -c init.c 
-DPIC -o .libs/init.lo
cc: Error: /usr/include/netinet/in6.h, line 64: Missing type specifier or type
qualifier. (missingtype)
        uint8_t sa6_addr[16];
--------^
cc: Error: /usr/include/netinet/in6.h, line 66: Missing type specifier or type
qualifier. (missingtype)
        uint16_t sa6_waddr[8];

The problem is that uint8_t and uint16_t are not defined. <netinet/in6.h> uses
uint8_t and expects it to be defined in <sys/bitypes.h>. However, the typedef of
uint8_t in <sys/bitypes.h> is wrapped with:
  #ifndef __BIT_TYPES_DEFINED__
  #define __BIT_TYPES_DEFINED__
  ...
  #endif
and we include <db.h> in "back-bdb.h" before <netinet/in6.h>. So, the types are
never  defined in <sys/bitypes.h> due to __BIT_TYPES_DEFINED__ being defined in
<db.h>. In <db.h>, only some of the types we are interested in are defined:
  #ifndef __BIT_TYPES_DEFINED__
  #define __BIT_TYPES_DEFINED__
  typedef unsigned char u_int8_t;
  typedef short int16_t;
  typedef unsigned short u_int16_t;
  typedef int int32_t;
  typedef unsigned int u_int32_t;
  #endif


How do you want to solve this? We could change the order of the #includes in
back-bdb.h from:
  #include <portable.h>
  #include <db.h>

  #include "slap.h"
to:
  #include <portable.h>
  #include "slap.h"
  #include <db.h>

I tried this and it works.