From de01710b08f879ee44460cc41f0f02cd39d01775 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 23 Jul 2015 18:45:31 +0300 Subject: [PATCH] hostapd: Add build options for selecting eloop type This adds CONFIG_ELOOP_POLL=y and CONFIG_ELOOP_EPOLL=y options to hostapd build options similarly to how these were implemented for wpa_supplicant. Signed-off-by: Jouni Malinen --- hostapd/Android.mk | 9 +++++++++ hostapd/Makefile | 8 ++++++++ hostapd/android.config | 6 ++++++ hostapd/defconfig | 6 ++++++ 4 files changed, 29 insertions(+) diff --git a/hostapd/Android.mk b/hostapd/Android.mk index f2c498dd3..b4e6ef324 100644 --- a/hostapd/Android.mk +++ b/hostapd/Android.mk @@ -127,6 +127,15 @@ endif endif OBJS += src/utils/eloop.c + +ifdef CONFIG_ELOOP_POLL +L_CFLAGS += -DCONFIG_ELOOP_POLL +endif + +ifdef CONFIG_ELOOP_EPOLL +L_CFLAGS += -DCONFIG_ELOOP_EPOLL +endif + OBJS += src/utils/common.c OBJS += src/utils/wpa_debug.c OBJS += src/utils/wpabuf.c diff --git a/hostapd/Makefile b/hostapd/Makefile index 086a6412e..797b1b4c5 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile @@ -107,6 +107,14 @@ LIBS_h += -lrt LIBS_n += -lrt endif +ifdef CONFIG_ELOOP_POLL +CFLAGS += -DCONFIG_ELOOP_POLL +endif + +ifdef CONFIG_ELOOP_EPOLL +CFLAGS += -DCONFIG_ELOOP_EPOLL +endif + OBJS += ../src/utils/common.o OBJS_c += ../src/utils/common.o OBJS += ../src/utils/wpa_debug.o diff --git a/hostapd/android.config b/hostapd/android.config index 106e97940..0b1d7c769 100644 --- a/hostapd/android.config +++ b/hostapd/android.config @@ -180,6 +180,12 @@ CONFIG_OS=unix #LIBS_p += -lbfd -liberty -lz #LIBS_c += -lbfd -liberty -lz +# Should we use poll instead of select? Select is used by default. +#CONFIG_ELOOP_POLL=y + +# Should we use epoll instead of select? Select is used by default. +#CONFIG_ELOOP_EPOLL=y + # Enable AP CONFIG_AP=y diff --git a/hostapd/defconfig b/hostapd/defconfig index 62a0edeea..430f7584b 100644 --- a/hostapd/defconfig +++ b/hostapd/defconfig @@ -240,6 +240,12 @@ CONFIG_IPV6=y # requirements described above. #CONFIG_NO_RANDOM_POOL=y +# Should we use poll instead of select? Select is used by default. +#CONFIG_ELOOP_POLL=y + +# Should we use epoll instead of select? Select is used by default. +#CONFIG_ELOOP_EPOLL=y + # Select TLS implementation # openssl = OpenSSL (default) # gnutls = GnuTLS