$NetBSD: patch-configure,v 1.5 2023/01/03 16:53:17 ryoon Exp $

--- configure.orig	2022-12-31 23:05:06.861637654 +0000
+++ configure
@@ -10102,7 +10102,7 @@ printf %s "checking for clang -fblocks..
 				AST_CLANG_BLOCKS="-Wno-unknown-warning-option -fblocks"
 				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
-			elif test "`echo 'int main(){return ^{return 42;}();}' | ${CC} -o /dev/null -fblocks -x c -lBlocksRuntime - 2>&1`" = ""; then
+			elif test "`echo 'int main(){return ^{return 42;}();}' | ${CC} ${LDFLAGS} -o /dev/null -fblocks -x c -lBlocksRuntime - 2>&1`" = ""; then
 				AST_CLANG_BLOCKS_LIBS="-lBlocksRuntime"
 				AST_CLANG_BLOCKS="-fblocks"
 				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -16525,7 +16525,7 @@ then :
 fi
 
 
-ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
+ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
 if test "x$ac_cv_header_sys_poll_h" = xyes
 then :
 
@@ -18962,6 +18962,18 @@ then :
   printf "%s\n" "#define HAVE_MALLOC_TRIM 1" >>confdefs.h
 
 fi
+ac_fn_c_check_func "$LINENO" "strftime_l" "ac_cv_func_strftime_l"
+if test "x$ac_cv_func_strftime_l" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRFTIME_L 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strptime_l" "ac_cv_func_strptime_l"
+if test "x$ac_cv_func_strptime_l" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRPTIME_L 1" >>confdefs.h
+
+fi
 
 
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for htonll" >&5
@@ -19431,7 +19443,7 @@ rm -f core conftest.err conftest.$ac_obj
 LDFLAGS=${old_LDFLAGS}
 rm -f conftest.dynamics
 
-ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
+ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
 if test "x$ac_cv_header_sys_poll_h" = xyes
 then :
   HAS_POLL=1
