]> granicus.if.org Git - libevent/commitdiff
Do not build strlcpy.c when it will have no code.
authorNick Mathewson <nickm@torproject.org>
Sun, 31 Mar 2013 18:05:26 +0000 (14:05 -0400)
committerNick Mathewson <nickm@torproject.org>
Sun, 31 Mar 2013 18:05:26 +0000 (14:05 -0400)
Makefile.am
configure.ac

index baf15247c49edaf0e38ece388ad3498ec48e4f43..24853c9ee0b111519d5f4eae445e603178871589 100644 (file)
@@ -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 =                                   \
index 9da77fc9078cc7b4c779f29ff2122d49aa3e08ab..dd79e4daed72805f49bcd18e6dc7f28a737a6fd6 100644 (file)
@@ -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],