Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit c86f05d

Browse files
committed
jabber_http_file_upload: fix build with gcc 10
With GCC 10, `HFUJabberStreamDataTable` being declared in a header file leads to the creation of 2 objects with that name: one when compiling `hfu_disco.c`, the other one when compiling `jabber_http_file_upload.c`. This results in link-time errors, which can be fixed by declaring `HFUJabberStreamDataTable` as `extern`.
1 parent aac06a4 commit c86f05d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/jabber_http_file_upload.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#include "hfu_util.h"
2727
#include "jabber_http_file_upload.h"
2828

29+
GHashTable *HFUJabberStreamDataTable;
30+
2931
GList *(*old_blist_node_menu)(PurpleBlistNode *node);
3032

3133
typedef struct {

src/jabber_http_file_upload.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ typedef struct _HFUXfer {
1616
GHashTable *put_headers;
1717
} HFUXfer;
1818

19-
GHashTable *HFUJabberStreamDataTable;
19+
extern GHashTable *HFUJabberStreamDataTable;
2020

2121
#define NS_HTTP_FILE_UPLOAD "urn:xmpp:http:upload"
2222
#define NS_HTTP_FILE_UPLOAD_V0 "urn:xmpp:http:upload:0"

0 commit comments

Comments
 (0)