Skip to content

Commit 64aa849

Browse files
leogrpoiana
authored andcommitted
fix(pkg/sdk): correct compilation error with glibc 2.38
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]>
1 parent 64ea3ac commit 64aa849

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/sdk/strlcpy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ limitations under the License.
2727
\return The length of the source string.
2828
*/
2929

30-
static inline size_t strlcpy(char *dst, const char *src, size_t size) {
30+
inline size_t strlcpy(char *dst, const char *src, size_t size) {
3131
size_t srcsize = strlen(src);
3232
if (size == 0) {
3333
return srcsize;

0 commit comments

Comments
 (0)