logo       

Two compile errors - dhcp-3.0.1rc11 with gcc 3.2 on Solaris 8 (64bit): msg#00335

network.dhcp.isc.dhcp-server

Subject: Two compile errors - dhcp-3.0.1rc11 with gcc 3.2 on Solaris 8 (64bit)

*** From dhcp-server -- To unsubscribe, see the end of this message. ***


Hi all.

I'm having two problems compiling (see subject).

This are my custom compile options (from Makefile.conf).

gcc64 -g -m64 -mcpu=ultrasparc -DPTRSIZE_64BIT -Wall -Wno-unused \
-Wno-implicit -Wno-comment -Wno-uninitialized -Wno-char-subscripts \
-Wno-switch -Werror -DSOLARIS_MAJOR=5 -DSOLARIS_MINOR=8

First problem:
---------------

In common/icmp.c (lines 180 and 181) there part of optional code:

#ifdef PTRSIZE_64BIT
icmp.icmp_id = (((u_int32_t)(u_int64_t)addr) ^
(u_int32_t)(((u_int64_t)addr) >> 32));
#else

gcc says: u_int64_t undeclared, first use blablabla ...

but if I put "uint64_t" instead of "u_int64_t", everything seems to be
fine.

Second problem:
---------------

In common/dlpi.c I get an error:

dlpi.c:232: warning: long int format, different type arg (arg 3)
make[2]: *** [dlpi.o] Error 1

But then I cast (probably stupid move) "(long) dlp -> info_ack.dl_mac_type"

log_fatal ("%s: unsupported DLPI MAC type %ld",
info -> name, dlp -> info_ack.dl_mac_type);
break;

... and gcc is happy.


My question is:
----------------

Can I expect core dumps in production with this small hacks? That is,
is uint64_t the same type as u_int64_t? Can I cast that stuct member
into long just easy like that? I'm not a programmer, just a courious
and mad admin who likes wild life on the bleeding edge. ;-)

Thanks ...


--
The Network is the Filesystem


-----------------------------------------------------------------------
List Archives : http://www.isc.org/ml-archives/dhcp-server/
Unsubscribe : http://www.isc.org/dhcp-lists.html
-or- : mailto:dhcp-server-request@xxxxxxx?Subject=unsubscribe
-----------------------------------------------------------------------




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise