Skip to content

Commit

Permalink
Don't use our own strlcat/strlcpy when we notice the system
Browse files Browse the repository at this point in the history
has it's own version. refs appneta#115
  • Loading branch information
synfinatic committed Nov 28, 2013
1 parent b43c035 commit 6f45329
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
if ! SYSTEM_STRLCPY
noinst_LIBRARIES = libstrl.a

libstrl_a_SOURCES = strlcat.c strlcpy.c
endif

noinst_HEADERS = strlcpy.h tree.h queue.h sll.h

Expand Down
2 changes: 2 additions & 0 deletions src/common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ endif

AM_CFLAGS = -I.. -I../.. $(LNAV_CFLAGS) @LDNETINC@

if ! SYSTEM_STRLCPY
libcommon_a_LIBADD = ../../lib/libstrl.a
endif

noinst_HEADERS = cidr.h err.h list.h cache.h services.h get.h \
fakepcap.h fakepcapnav.h fakepoll.h xX.h utils.h \
Expand Down
2 changes: 2 additions & 0 deletions src/common/cidr.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
#include "config.h"
#include "defines.h"
#include "common.h"
#ifndef HAVE_STRLCPY
#include "lib/strlcpy.h"
#endif

#include <stdio.h>
#include <stdlib.h>
Expand Down
3 changes: 3 additions & 0 deletions src/common/tcpdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@
#endif

#include "tcpdump.h"

#ifndef HAVE_STRLCPY
#include "lib/strlcpy.h"
#endif

#ifdef DEBUG
extern int debug;
Expand Down
2 changes: 2 additions & 0 deletions src/defines.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@

#include "@LPCAPINC@"

#ifndef HAVE_STRLCPY
#include "lib/strlcpy.h"
#endif
#include "common/list.h"
#include "common/cidr.h"

Expand Down

0 comments on commit 6f45329

Please sign in to comment.