packages: some (e)glibc fixes after r44701
[openwrt.git] / package / network / services / hostapd / Makefile
index 838ef39..eeba028 100644 (file)
@@ -71,7 +71,6 @@ DRIVER_MAKEOPTS= \
        CONFIG_IEEE80211N=$(HOSTAPD_IEEE80211N) \
        CONFIG_IEEE80211W=$(CONFIG_PACKAGE_kmod-ath9k) \
        CONFIG_DRIVER_WEXT=$(CONFIG_DRIVER_WEXT_SUPPORT) \
-       $(if $(CONFIG_WPA_RFKILL_SUPPORT),NEED_RFKILL=y)
 
 ifneq ($(LOCAL_TYPE),hostapd)
   ifdef CONFIG_WPA_SUPPLICANT_OPENSSL
@@ -83,11 +82,14 @@ ifneq ($(LOCAL_TYPE),hostapd)
   ifdef CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK
     TARGET_CFLAGS += -DNO_TIMESTAMP_CHECK
   endif
+  ifdef CONFIG_WPA_RFKILL_SUPPORT
+    DRIVER_MAKEOPTS += NEED_RFKILL=y
+  endif
   DRIVER_MAKEOPTS += \
        CONFIG_DRIVER_ROBOSWITCH=$(CONFIG_PACKAGE_kmod-switch)
 endif
 
-ifdef CONFIG_USE_EGLIBC
+ifdef CONFIG_USE_GLIBC
   TARGET_LDFLAGS += -lrt
   TARGET_LDFLAGS_C += -lrt
 endif
@@ -292,7 +294,7 @@ define Build/Compile/wpad
        echo ` \
                $(call Build/RunMake,hostapd,-s MULTICALL=1 dump_cflags); \
                $(call Build/RunMake,wpa_supplicant,-s MULTICALL=1 dump_cflags) | \
-               sed -e 's,-n ,,g' -e 's,$(TARGET_CFLAGS),,' \
+               sed -e 's,-n ,,g' -e 's^$(TARGET_CFLAGS)^^' \
        ` > $(PKG_BUILD_DIR)/.cflags
        +$(call Build/RunMake,hostapd, \
                CFLAGS="$$$$(cat $(PKG_BUILD_DIR)/.cflags)" \