diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/Makefile | 8 | ||||
-rw-r--r-- | tools/perf/util/cache.h | 2 | ||||
-rw-r--r-- | tools/perf/util/path.c | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 31a07f95fd98..5216ade909d0 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -743,11 +743,9 @@ ifeq ($(NO_PERF_REGS),0) | |||
743 | BASIC_CFLAGS += -DHAVE_PERF_REGS | 743 | BASIC_CFLAGS += -DHAVE_PERF_REGS |
744 | endif | 744 | endif |
745 | 745 | ||
746 | ifdef NO_STRLCPY | 746 | ifndef NO_STRLCPY |
747 | BASIC_CFLAGS += -DNO_STRLCPY | 747 | ifeq ($(call try-cc,$(SOURCE_STRLCPY),),y) |
748 | else | 748 | BASIC_CFLAGS += -DHAVE_STRLCPY |
749 | ifneq ($(call try-cc,$(SOURCE_STRLCPY),),y) | ||
750 | BASIC_CFLAGS += -DNO_STRLCPY | ||
751 | endif | 749 | endif |
752 | endif | 750 | endif |
753 | 751 | ||
diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h index 07aec06e4443..2bd51370ad28 100644 --- a/tools/perf/util/cache.h +++ b/tools/perf/util/cache.h | |||
@@ -107,7 +107,7 @@ extern char *perf_path(const char *fmt, ...) __attribute__((format (printf, 1, 2 | |||
107 | extern char *perf_pathdup(const char *fmt, ...) | 107 | extern char *perf_pathdup(const char *fmt, ...) |
108 | __attribute__((format (printf, 1, 2))); | 108 | __attribute__((format (printf, 1, 2))); |
109 | 109 | ||
110 | #ifdef NO_STRLCPY | 110 | #ifndef HAVE_STRLCPY |
111 | extern size_t strlcpy(char *dest, const char *src, size_t size); | 111 | extern size_t strlcpy(char *dest, const char *src, size_t size); |
112 | #endif | 112 | #endif |
113 | 113 | ||
diff --git a/tools/perf/util/path.c b/tools/perf/util/path.c index bd7497711424..a8c49548ca48 100644 --- a/tools/perf/util/path.c +++ b/tools/perf/util/path.c | |||
@@ -22,7 +22,7 @@ static const char *get_perf_dir(void) | |||
22 | return "."; | 22 | return "."; |
23 | } | 23 | } |
24 | 24 | ||
25 | #ifdef NO_STRLCPY | 25 | #ifndef HAVE_STRLCPY |
26 | size_t strlcpy(char *dest, const char *src, size_t size) | 26 | size_t strlcpy(char *dest, const char *src, size_t size) |
27 | { | 27 | { |
28 | size_t ret = strlen(src); | 28 | size_t ret = strlen(src); |