errors compiling dbus-1.2.24 on minix3

Thiago Macieira thiago at kde.org
Tue Sep 28 10:18:11 PDT 2010


Em Terça-feira 28 Setembro 2010, às 16:57:23, Lencsés Lóránt escreveu:
> I set the mail format to plain text, hopefully it preserves the format I
> put the text in.

Thanks, it helps. There's still an HTML component to your email, but I can 
read the text better.

> Unfortunately, putting time.h at the top of the source didn't help
> which is rather strange since it contains the struct needed indeed.
> However, copying the structure declaration into the code helped -sorry for
> the hack:(

You need to investigate what the issue is then. If the struct is clearly 
defined in time.h, then #include <time.h> should fix it.

> dbus-sysdeps-unix.c:762: error: storage size of &#39;hints&#39; isn&#39;t
> known

Same problem, something forward declared and that wasn't found. Given the name 
of this variable and the next error, I guess that this is "struct addrinfo".

> dbus-sysdeps-unix.c:794: warning: implicit declaration of function
> &#39;getaddrinfo&#39;

This is from netdb.h. We're probably requiring the getaddrinfo(3) function, 
which is only some 10 years old and required for proper hostname resolution. 
Minix probably only offers gethostbyname(3), so you'll need to port the code to 
the older interface.

So all of the errors following that until what's below are related to Minix 
not providing getaddrinfo. If you port the code, you'll solve these issues.

> dbus-sysdeps-unix.c:1230: warning: passing argument 5 of
> &#39;getsockopt&#39; from incompatible pointer type
> /usr/pkg/gcc44/lib/gcc/i686-pc-minix/4.4.3/include-fixed/sys/socket.h:133:
> note: expected &#39;socklen_t *&#39; but argument is of type &#39;int
> *&#39;

getsockopt's argument is a known issue. This should be a configure-time check 
though.

> dbus-sysdeps-unix.c: In function &#39;_dbus_sleep_milliseconds&#39;:
> dbus-sysdeps-unix.c:2519: error: storage size of &#39;req&#39; isn&#39;t
> known dbus-sysdeps-unix.c:2520: error: storage size of &#39;rem&#39;
> isn&#39;t known

Probably struct timespec again.

> dbus-sysdeps-unix.c:2527: warning: implicit declaration of function
> &#39;nanosleep&#39;
> dbus-sysdeps-unix.c:2839: warning: implicit declaration of function
> &#39;vsnprintf&#39;

nanosleep is a POSIX function, from <time.h>. Is the header included?

As for vsnprintf, it's C99. If your C library doesn't have it, you'll need to 
port to older functions like vsprintf.

> dbus-sysdeps-unix.c:2924: warning: implicit declaration of function
> &#39;sigemptyset&#39; 
> dbus-sysdeps-unix.c:2924: warning: nested extern
> declaration of &#39;sigemptyset&#39; 
> dbus-sysdeps-unix.c:2925: warning: implicit declaration of function
> &#39;sigaddset&#39;
> dbus-sysdeps-unix.c:2925: warning: nested extern declaration of
> &#39;sigaddset&#39; 
> dbus-sysdeps-unix.c:2926: warning: implicit declaration of function
> &#39;sigprocmask&#39; 
> dbus-sysdeps-unix.c:2926: warning: nested extern declaration of
> &#39;sigprocmask&#39;
> dbus-sysdeps-unix.c:2926: error: &#39;SIG_BLOCK&#39; undeclared (first use
> in this function) 
> dbus-sysdeps-unix.c:2999: error: &#39;SIG_SETMASK&#39;
> undeclared (first use in this function)

All of these are from <signal.h> and are from POSIX.1-2001.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

Qt Developer Days 2010  -  Munich Oct 11-13  -  San Francisco Nov 1-3
For more information and to register: http://qt.nokia.com/qtdevdays2010
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100928/dc0f8342/attachment.pgp>


More information about the dbus mailing list