summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_socket.c
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-02-05 11:05:45 +0000
committerume <ume@FreeBSD.org>2003-02-05 11:05:45 +0000
commitf1aeff9dcbbfd44faf53c5eddf9f6206bd2bdce1 (patch)
treef7f87787993b9be6d9245ce490f9292907c75eb8 /sys/compat/linux/linux_socket.c
parent0b8bb3726695528af3b0d77de22722498d4ffe29 (diff)
downloadFreeBSD-src-f1aeff9dcbbfd44faf53c5eddf9f6206bd2bdce1.zip
FreeBSD-src-f1aeff9dcbbfd44faf53c5eddf9f6206bd2bdce1.tar.gz
Avoid undefined symbol error with an IPv4 only kernel.
Reported by: "Sergey A. Osokin" <osa@freebsd.org.ru>
Diffstat (limited to 'sys/compat/linux/linux_socket.c')
-rw-r--r--sys/compat/linux/linux_socket.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 63f2f83..f283786 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -549,7 +549,15 @@ linux_socket(struct thread *td, struct linux_socket_args *args)
* default and some apps depend on this. So, set V6ONLY to 0
* for Linux apps if the sysctl value is set to 1.
*/
- if (bsd_args.domain == PF_INET6 && retval_socket >= 0 && ip6_v6only) {
+ if (bsd_args.domain == PF_INET6 && retval_socket >= 0
+#ifndef KLD_MODULE
+ /*
+ * XXX: Avoid undefined symbol error with an IPv4 only
+ * kernel.
+ */
+ && ip6_v6only
+#endif
+ ) {
caddr_t sg;
int *v6only;
OpenPOWER on IntegriCloud