  IF(APR_INSTALL_PRIVATE_H)
    # Kludges for unexpected dependencies of httpd 2.x, not installed by default
    SET(APR_PRIVATE_H_FOR_HTTPD
-@@ -402,8 +515,8 @@ IF(APR_INSTALL_PRIVATE_H)
+@@ -402,8 +518,8 @@ IF(APR_INSTALL_PRIVATE_H)
      include/arch/win32/apr_arch_utf8.h
      include/arch/win32/apr_private.h
      )

 ENDIF()
 
 STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype)
@@ -417,7 +530,9 @@ MESSAGE(STATUS "  Install .pdb (if available)...... : ${INSTALL_PDB}")
 MESSAGE(STATUS "  Install prefix .................. : ${CMAKE_INSTALL_PREFIX}")
 MESSAGE(STATUS "  C compiler ...................... : ${CMAKE_C_COMPILER}")
 MESSAGE(STATUS "  IPv6 ............................ : ${APR_HAVE_IPV6}")

+set(CMAKE_REQUIRED_LIBRARIES)
+set(CMAKE_REQUIRED_DEFINITIONS)
+add_definitions(-DHAVE_CONFIG_H)
+if(UNIX)
+  add_definitions(-DCMAKE_UNIX)
+endif()
diff --git a/include/apr_general.h b/include/apr_general.h
index c7389ec..0b32945 100644
--- a/include/apr_general.h
