Skip to content

Commit

Permalink
fix(pkg/sdk): correct compilation error with glibc 2.38
Browse files Browse the repository at this point in the history
This commits aims to fix the following compilation error: "static declaration of ‘strlcpy’ follows non-static declaration".

In glibc 2.38, the strlcpy and strlcat functions have been added. However, the glibc declaration for strlcpy is non-static.

Signed-off-by: Leonardo Grasso <[email protected]>
  • Loading branch information
leogr authored and poiana committed Aug 29, 2023
1 parent 64ea3ac commit 64aa849
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sdk/strlcpy.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ limitations under the License.
\return The length of the source string.
*/

static inline size_t strlcpy(char *dst, const char *src, size_t size) {
inline size_t strlcpy(char *dst, const char *src, size_t size) {
size_t srcsize = strlen(src);
if (size == 0) {
return srcsize;
Expand Down

0 comments on commit 64aa849

Please sign in to comment.