diff options
author | Brad King <brad.king@kitware.com> | 2019-05-21 11:43:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-05-21 13:32:21 (GMT) |
commit | 6c81c6538b9ab53a8a8f378e1c35ec25c223200a (patch) | |
tree | 29d2d997e2d7b5a1923e6cf95e8b3fe9f2d0da52 | |
parent | f872033d7531ed1d7d7345ff7873442ec8dbcee1 (diff) | |
download | CMake-6c81c6538b9ab53a8a8f378e1c35ec25c223200a.zip CMake-6c81c6538b9ab53a8a8f378e1c35ec25c223200a.tar.gz CMake-6c81c6538b9ab53a8a8f378e1c35ec25c223200a.tar.bz2 |
libarchive: avoid b64_encode name conflict with Solaris built-in function
Solaris 11.4 has a built-in function named `b64_encode`. Add a
`la_` prefix to our internal function to avoid conflict.
Fixes: #19268
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_write_add_filter_b64encode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_write_add_filter_b64encode.c b/Utilities/cmlibarchive/libarchive/archive_write_add_filter_b64encode.c index 85eb087..b46b19a 100644 --- a/Utilities/cmlibarchive/libarchive/archive_write_add_filter_b64encode.c +++ b/Utilities/cmlibarchive/libarchive/archive_write_add_filter_b64encode.c @@ -60,7 +60,7 @@ static int archive_filter_b64encode_write(struct archive_write_filter *, const void *, size_t); static int archive_filter_b64encode_close(struct archive_write_filter *); static int archive_filter_b64encode_free(struct archive_write_filter *); -static void b64_encode(struct archive_string *, const unsigned char *, size_t); +static void la_b64_encode(struct archive_string *, const unsigned char *, size_t); static int64_t atol8(const char *, size_t); static const char base64[] = { @@ -180,7 +180,7 @@ archive_filter_b64encode_open(struct archive_write_filter *f) } static void -b64_encode(struct archive_string *as, const unsigned char *p, size_t len) +la_b64_encode(struct archive_string *as, const unsigned char *p, size_t len) { int c; @@ -234,12 +234,12 @@ archive_filter_b64encode_write(struct archive_write_filter *f, const void *buff, } if (state->hold_len < LBYTES) return (ret); - b64_encode(&state->encoded_buff, state->hold, LBYTES); + la_b64_encode(&state->encoded_buff, state->hold, LBYTES); state->hold_len = 0; } for (; length >= LBYTES; length -= LBYTES, p += LBYTES) - b64_encode(&state->encoded_buff, p, LBYTES); + la_b64_encode(&state->encoded_buff, p, LBYTES); /* Save remaining bytes. */ if (length > 0) { @@ -270,7 +270,7 @@ archive_filter_b64encode_close(struct archive_write_filter *f) /* Flush remaining bytes. */ if (state->hold_len != 0) - b64_encode(&state->encoded_buff, state->hold, state->hold_len); + la_b64_encode(&state->encoded_buff, state->hold, state->hold_len); archive_string_sprintf(&state->encoded_buff, "====\n"); /* Write the last block */ archive_write_set_bytes_in_last_block(f->archive, 1); |