]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix build with libnl 1.1
authorJouni Malinen <j@w1.fi>
Mon, 26 Jan 2015 23:50:02 +0000 (01:50 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 26 Jan 2015 23:50:02 +0000 (01:50 +0200)
Commit 630b3230c86abf1976a39db596c51540e57e31c8 ('nl80211: Increase
netlink receive buffer size') added unconditional use of
nl_socket_set_buffer_size() which was not included in libnl 1.1. Fix use
of that old version by making this conditional on CONFIG_LIBNL20.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211.c

index ed2f17170c4f38146646008ff3d42b735cf0e258..d681ea637a8b04998c6b3bce16a73b07b5993684 100644 (file)
@@ -132,6 +132,7 @@ static void nl80211_register_eloop_read(struct nl_handle **handle,
                                        eloop_sock_handler handler,
                                        void *eloop_data)
 {
+#ifdef CONFIG_LIBNL20
        /*
         * libnl uses a pretty small buffer (32 kB that gets converted to 64 kB)
         * by default. It is possible to hit that limit in some cases where
@@ -145,6 +146,7 @@ static void nl80211_register_eloop_read(struct nl_handle **handle,
                           strerror(errno));
                /* continue anyway with the default (smaller) buffer */
        }
+#endif /* CONFIG_LIBNL20 */
 
        nl_socket_set_nonblocking(*handle);
        eloop_register_read_sock(nl_socket_get_fd(*handle), handler,