From: Bastian Germann <
ba...@linutronix.de>
This reverts commit ca00d834c6f335ac53ab97dfd8e64fce3c24f3c0.
core/util.c | 22 ----------------------
include/util.h | 5 -----
2 files changed, 27 deletions(-)
diff --git a/core/util.c b/core/util.c
index 6f5313e..2025276 100644
--- a/core/util.c
+++ b/core/util.c
@@ -223,28 +223,6 @@ char *substring(const char *src, int first, int len) {
return s;
}
-#if defined(__linux__)
-size_t
-strlcpy(char *dst, const char * src, size_t size)
-{
-
- size_t len = strlen(src);
- /*
- * src is null termintaed,
- * copy the last '\0', too.
- */
- if (len < size) {
- memcpy(dst, src, len + 1);
- } else if (len) {
- /* truncate string */
- memcpy(dst, src, size - 1);
- /* Add C string terminator */
- dst[size - 1] = '\0';
- }
- return len;
-}
-#endif
-
int openfileoutput(const char *filename)
{
int fdout;
diff --git a/include/util.h b/include/util.h
index a0edd3e..e5a8955 100644
--- a/include/util.h
+++ b/include/util.h
@@ -181,11 +181,6 @@ int copy_write(void *out, const void *buf, unsigned int len);
#if defined(__FreeBSD__)
int copy_write_padded(void *out, const void *buf, unsigned int len);
#endif
-#if defined(__linux__)
-/* strlcpy was originally developped in FreeBSD, not present in glibc */
-size_t
-strlcpy(char *dst, const char * src, size_t size);
-#endif
int copyfile(int fdin, void *out, unsigned int nbytes, unsigned long *offs,
unsigned long long seek,
int skip_file, int compressed, uint32_t *checksum,
--
2.29.2