Kernel build failure when INET6 not defined
Matt Emmerton
matt at gsicomp.on.ca
Sat Dec 30 23:50:24 PST 2006
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;
More information about the Bugs
mailing list