ubase

suckless linux base utils
git clone git://git.2f30.org/ubase.git
Log | Files | Refs | README | LICENSE

commit a8e1ea139810054ffd25bd68f5d3a42bdbe1a058
parent 1de3e6c679a608aa07dfc2d3b419045697879572
Author: sin <sin@2f30.org>
Date:   Mon Feb 10 13:14:12 +0000

Guard against strlcpy()/strlcat() being implemented as macros

Diffstat:
util.h | 2++
util/strlcat.c | 1+
util/strlcpy.c | 1+
3 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/util.h b/util.h @@ -14,6 +14,8 @@ void eprintf(const char *, ...); long estrtol(const char *, int); void putword(const char *); void recurse(const char *, void (*)(const char *)); +#undef strlcat size_t strlcat(char *, const char *, size_t); +#undef strlcpy size_t strlcpy(char *, const char *, size_t); char *ttytostr(int, int); diff --git a/util/strlcat.c b/util/strlcat.c @@ -1,5 +1,6 @@ #include <stdio.h> #include <string.h> +#include "../util.h" size_t strlcat(char *dest, const char *src, size_t count) diff --git a/util/strlcpy.c b/util/strlcpy.c @@ -1,5 +1,6 @@ #include <stdio.h> #include <string.h> +#include "../util.h" size_t strlcpy(char *dest, const char *src, size_t size)