DragonFly bugs List (threaded) for 2006-12
DragonFly BSD
DragonFly bugs List (threaded) for 2006-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Kernel build failure when INET6 not defined


From: "Matt Emmerton" <matt@xxxxxxxxxxxxx>
Date: Sun, 31 Dec 2006 02:46:42 -0500

If you compile a kernel with INET6 *not* defined, you will get the following
failure:

>> linking kernel.debug
>> kern_jail.o(.text+0xb2b): In function `sysctl_jail_list':
>> /usr/src/sys/kern/kern_jail.c:572: undefined reference to `ip6_sprintf'
>> *** Error code 1

This appears to be a new problem introduced by rev 1.14 of kern/kern_jail.c.

The following patch (also attached to preserve whitespace) fixes the problem
by wrapping the INET6-specific code with the proper #if check.

--- kern_jail.c 29 Dec 2006 18:02:56 -0000      1.14
+++ kern_jail.c 31 Dec 2006 07:19:52 -0000
@@ -567,8 +567,10 @@

                        if (jsin->sin_family == AF_INET)
                                oip = inet_ntoa(jsin->sin_addr);
+#if INET6
                        else
                                oip = ip6_sprintf(&jsin6->sin6_addr);
+#endif

                        if ( (jlssize - jlsused) < (sizeof(oip) + 1)) {
                                error = ERANGE;

--
Matt Emmerton
--- kern_jail.c 29 Dec 2006 18:02:56 -0000      1.14
+++ kern_jail.c 31 Dec 2006 07:19:52 -0000
@@ -567,8 +567,10 @@

                        if (jsin->sin_family == AF_INET)
                                oip = inet_ntoa(jsin->sin_addr);
+#if INET6
                        else
                                oip = ip6_sprintf(&jsin6->sin6_addr);
+#endif

                        if ( (jlssize - jlsused) < (sizeof(oip) + 1)) {
                                error = ERANGE;


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]