diff --git a/funcs/Makefile b/funcs/Makefile
index 39ddeaa47b1cde90b2636b84d66973d8bd56c54f..e679e681caa0bd8847d3742b77bba544929071b3 100644
--- a/funcs/Makefile
+++ b/funcs/Makefile
@@ -17,9 +17,15 @@ ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h $(CROSS_COMPILE_
   MODS:=$(filter-out func_odbc.so,$(MODS))
 endif
 
+ifeq ($(OSARCH),SunOS)
 ifneq ($(shell if [ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]; then echo "OK" ; fi),)
   CURLLIBS:=$(shell $(CROSS_COMPILE_BIN)curl-config --libs)
 endif
+else
+ifneq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]; then echo "OK" ; fi),)
+  CURLLIBS:=$(shell $(CROSS_COMPILE_BIN)curl-config --libs)
+endif
+endif
 
 ifeq (${CURLLIBS},)
   MODS:=$(filter-out func_curl.so,$(MODS))