summaryrefslogtreecommitdiff
path: root/src/apk_blob.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2019-02-13 15:44:03 +0200
committerTimo Teräs <timo.teras@iki.fi>2019-02-13 16:05:27 +0200
commit44daf808737f85ff462905269c7a1e66d52e2fff (patch)
tree08a62633282647b9695adc2a460b1dbe0799bab6 /src/apk_blob.h
parent86922d1a34fc1004f439b0b86bfbd908a9f07422 (diff)
downloadapk-tools-44daf808737f85ff462905269c7a1e66d52e2fff.tar.gz
apk-tools-44daf808737f85ff462905269c7a1e66d52e2fff.tar.bz2
apk-tools-44daf808737f85ff462905269c7a1e66d52e2fff.tar.xz
apk-tools-44daf808737f85ff462905269c7a1e66d52e2fff.zip
fix strncpy bounds errors
error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation] Based on patch by Elan Ruusamäe <glen@delfi.ee>
Diffstat (limited to 'src/apk_blob.h')
-rw-r--r--src/apk_blob.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/apk_blob.h b/src/apk_blob.h
index 4fdd3be..c14980d 100644
--- a/src/apk_blob.h
+++ b/src/apk_blob.h
@@ -133,4 +133,8 @@ void apk_atom_init(void);
apk_blob_t *apk_blob_atomize(apk_blob_t blob);
apk_blob_t *apk_blob_atomize_dup(apk_blob_t blob);
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
+extern size_t strlcpy(char *dest, const char *src, size_t size);
+#endif
+
#endif