[Dnsmasq-discuss] Problem compiling 2.51 on Solaris 2009.06

Lee Essen lee.essen at me.com
Sat Nov 21 11:59:10 GMT 2009

On Saturday, November 21, 2009, at 09:30AM, "Simon Kelley" <simon at thekelleys.org.uk> wrote:
>Lee Essen wrote:
>> Hi,
>> I've been a dnsmasq user for quite a few years on both Solaris and
>> Linux, but it's been a while since I've tried to build on Solaris.
>> I've just tried to build 2.51 on the latest Solaris build and there
>> seems to be a number of really fundamental issues.
>> I notice Solaris mentioned quite a few times in the changelog so
>> there seems to be a continued effort around this, and I certainly
>> don't remember any issues in the past, however unless I'm doing
>> something fundamentally wrong (which is a distinct possibility) I
>> think a few tweaks are needed...
>> I have attached a patch that covers all the changes I needed to make,
>> although I must confess that whilst it's now compiles I haven't
>> tested it yet.
>> Three main problems...
>> 1.  config.h is included after sys/socket.h -- this means that
>> _XPG4_2 isn't defined yet and therefore all of the CMSG_* defines get
>> missed (CMSG_SPACE for example.)
>> 2. struct ifreq seems to have become struct lifrect (at least if you
>> need ifr_mtu), so this impacts a number of references in two or three
>> files.
>> 3. LOG_PRI doesn't seem to exist at all.
>> I'm not suggesting my patch is the right solution, it's probably far
>> from it, but it's enough to highlight the issues.
>> If I'm missed something obvious then please let me know, otherwise
>> I'll continue to test and see if I can come up with a less disruptive
>> way of incorporating these fixes.
>Many thanks for this.
>By some weird coincidence, I was working on this yesterday too. I found 
>and fixed your problems 1 and 3 but didn't get bitten by 2. Does that 
>turn up as a compile-time problem, or just run-time?
>Anyway, the results of my efforts are at
>which compile, but have not been functionally tested yet.
>Please could you check that and let me know if it's OK, or if I need to 
>work-in your lifr stuff?


I still see the same problem with the ifr bits - this is on the latest Solaris release ... it looks like it's just the ifr_mtu field that's the problem, according to the if.h file the struct ifreq is kept for compatibility but there is no ifr_mtu field as part of the union.

I've attached if.h for your info, just in case you have an older version.

make[1]: Entering directory `/site/internal/build/dnsmasq-2.52test7/src'
cc -Wall -W -O2     -c cache.c
cc -Wall -W -O2     -c rfc1035.c
cc -Wall -W -O2     -c util.c
cc -Wall -W -O2     -c option.c
cc -Wall -W -O2     -c forward.c
cc -Wall -W -O2     -c network.c
network.c: In function `iface_allowed':
network.c:149: error: structure has no member named `ifr_mtu'
network.c: At top level:
network.c:555: warning: unused parameter 'intname'
network.c:39: warning: unused parameter 'fd'
make[1]: *** [network.o] Error 1
make[1]: Leaving directory `/site/internal/build/dnsmasq-2.52test7/src'
make: *** [dnsmasq] Error 2


-------------- next part --------------
A non-text attachment was scrubbed...
Name: if.h
Type: application/octet-stream
Size: 26310 bytes
Desc: not available
Url : http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20091121/f184b337/attachment-0001.obj 

More information about the Dnsmasq-discuss mailing list