From 4914620025a7e457fc4c3a936441fce681bb6c38 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sun, 31 Mar 2013 14:05:26 -0400 Subject: [PATCH] Do not build strlcpy.c when it will have no code. --- Makefile.am | 4 +++- configure.ac | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index baf15247..24853c9e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -156,6 +156,9 @@ SYS_INCLUDES = endif +if STRLCPY_IMPL +SYS_SRC += strlcpy.c +endif if SELECT_BACKEND SYS_SRC += select.c endif @@ -200,7 +203,6 @@ CORE_SRC = \ evutil_time.c \ listener.c \ log.c \ - strlcpy.c \ $(SYS_SRC) EXTRAS_SRC = \ diff --git a/configure.ac b/configure.ac index 9da77fc9..dd79e4da 100644 --- a/configure.ac +++ b/configure.ac @@ -362,6 +362,7 @@ AC_CHECK_FUNCS([ \ usleep \ vasprintf \ ]) +AM_CONDITIONAL(STRLCPY_IMPL, [test x"$ac_cv_func_strlcpy" = xno]) AC_CACHE_CHECK( [for getaddrinfo],