Compiling DHCP 4.2.4-P1 On Mac OS X Mountain Lion Server
Shawn Routhier
sar at isc.org
Tue Aug 28 15:50:53 UTC 2012
On Aug 28, 2012, at 5:29 AM, Siegenthaler Tina wrote:
>
> Am 28.08.2012 um 12:22 schrieb Richard Robbins:
>
>> Here is the gcc call to compile socket.c
>>
>> gcc -DHAVE_CONFIG_H -I. -I../includes -I.. -DLOCALSTATEDIR='"/var"' -g -O2 -Wall -Werror -fno-strict-aliasing -I../bind/include -MT socket.o -MD -MP -MF .deps/socket.Tpo -c -o socket.o socket.c
>>
>> Which results in the following:
>>
>> socket.c: In function ‘if_register_socket’:
>> socket.c:299: error: ‘IPV6_PKTINFO’ undeclared (first use in this function)
>> socket.c:299: error: (Each undeclared identifier is reported only once
>> socket.c:299: error: for each function it appears in.)
>> socket.c: In function ‘send_packet6’:
>> socket.c:746: error: ‘IPV6_PKTINFO’ undeclared (first use in this function)
>> socket.c: In function ‘receive_packet6’:
>> socket.c:957: error: ‘IPV6_PKTINFO’ undeclared (first use in this function)
>> make[2]: *** [socket.o] Error 1
>> make[1]: *** [all-recursive] Error 1
>> make: *** [all-recursive] Error 1
>>
>>
>>
>
>
> Hi Richard
>
>
> I'm not entirely sure, but I think I got the same error when compiling on Lion. Adding "#define __APPLE_USE_RFC_2292" at the beginning of socket.c solved the problem. I don't have the time right now to test it on ML, but maybe you can give this a try? If not, I'll do it tomorrow and report back.
>
>
> HTH, Tina
The easiest way to do this is to set the CFLAGS in the configure script.
./configure CFLAGS=-D__APPLE_USE_RFC_3542
or
./configure CFLAGS=-D__APPLE_USE_RFC_2292
Though I also haven't tried to compile it on Mountain Lion either.
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
More information about the dhcp-users
mailing list