Changeset 37ef2cb


Ignore:
Timestamp:
2024-05-08T15:44:42Z (3 weeks ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Parents:
210d1d9
git-author:
Petr Vaněk <arkamar@…> (20-02-24 07:55:25)
git-committer:
Jelmer Vernooij <jelmer@…> (08-05-24 15:44:42)
Message:

Adjust sha1_random_uuid usage in jabber/conference.c

The jabber/conference.c module failed to compile due to the implicit use
of the sha1_random_uuid function following the deprecation of the sha1
lib. This patch reintroduces the sha1.h include to resolve compilation
errors encountered with GCC 14:

error: implicit declaration of function ‘sha1_random_uuid’

Additionally, the patch corrects the type mismatch error when calling
sha1_random_uuid, aligning with the expected ‘GChecksum ’ type,
otherwise compilation fails with following error:

error: passing argument 1 of ‘sha1_random_uuid’ from incompatible pointer type
note: expected ‘GChecksum ’ {aka ‘struct _GChecksum ’} but argument is of type ‘GChecksum *’ {aka ‘struct _GChecksum *’}

Fixes: a4ac9c413b97 ("Deprecate sha1_* functions (#172)")

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/conference.c

    r210d1d9 r37ef2cb  
    2323
    2424#include "jabber.h"
     25#include "sha1.h"
    2526
    2627static xt_status jabber_chat_join_failed(struct im_connection *ic, struct xt_node *node, struct xt_node *orig);
     
    8687        g_checksum_update(sum, (uint8_t *) &now, sizeof(now));
    8788        g_checksum_update(sum, (uint8_t *) who, strlen(who));
    88         uuid = sha1_random_uuid(sum);
     89        uuid = sha1_random_uuid(&sum);
    8990
    9091        if (jd->flags & JFLAG_GTALK) {
Note: See TracChangeset for help on using the changeset viewer.