diff --git a/srcpkgs/csync2/patches/musl-strlcpy.patch b/srcpkgs/csync2/patches/musl-strlcpy.patch new file mode 100644 index 00000000000..5b9342f55c4 --- /dev/null +++ b/srcpkgs/csync2/patches/musl-strlcpy.patch @@ -0,0 +1,18 @@ +--- rsync.c 2015-03-09 15:08:51.000000000 +0100 ++++ rsync.c 2015-10-06 16:44:57.988159380 +0200 +@@ -39,6 +39,7 @@ + #endif + + ++#if defined(__GLIBC__) + /* This has been taken from rsync:lib/compat.c */ + + /** +@@ -61,6 +62,7 @@ + } + return ret; + } ++#endif + + /* splits filepath at the last '/', if any, like so: + * dirname basename filepath diff --git a/srcpkgs/csync2/patches/remove-strlcpy.patch b/srcpkgs/csync2/patches/remove-strlcpy.patch deleted file mode 100644 index 75332e89b3d..00000000000 --- a/srcpkgs/csync2/patches/remove-strlcpy.patch +++ /dev/null @@ -1,36 +0,0 @@ -The declaration of strlcpy conflicts with the musl libc -implementation. The libc (GNU or musl) implementation -should be sufficient in any case. - ---- rsync.c 2015-03-09 15:08:51.000000000 +0100 -+++ rsync.c 2015-10-06 16:39:10.499186490 +0200 -@@ -39,29 +39,6 @@ - #endif - - --/* This has been taken from rsync:lib/compat.c */ -- --/** -- * Like strncpy but does not 0 fill the buffer and always null -- * terminates. -- * -- * @param bufsize is the size of the destination buffer. -- * -- * @return index of the terminating byte. -- **/ --static size_t strlcpy(char *d, const char *s, size_t bufsize) --{ -- size_t len = strlen(s); -- size_t ret = len; -- if (bufsize > 0) { -- if (len >= bufsize) -- len = bufsize-1; -- memcpy(d, s, len); -- d[len] = 0; -- } -- return ret; --} -- - /* splits filepath at the last '/', if any, like so: - * dirname basename filepath - * "/" "" "/"