From a3248d43ecc315358b1dfe596684cacf4083d744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Claes=20N=C3=A4st=C3=A9n?= Date: Sat, 15 May 2021 18:10:02 +0200 Subject: [PATCH] Use g_strndup, strndup is not available on old platforms strndup is not available on Solaris 10, to ensure building is ok use glib function. --- src/otr/otr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/otr/otr.c b/src/otr/otr.c index 80604513..abe24726 100644 --- a/src/otr/otr.c +++ b/src/otr/otr.c @@ -643,7 +643,7 @@ static enum otr_msg_status enqueue_otr_fragment(const char *msg, struct otr_peer * Dup the string with enough space for the NULL byte since we are * about to free it before passing it to the caller. */ - *full_msg = strndup(opc->full_msg, opc->msg_len + 1); + *full_msg = g_strndup(opc->full_msg, opc->msg_len + 1); /* Reset everything. */ free(opc->full_msg); opc->full_msg = NULL;