Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

Commit

Permalink
Closes IBBoard#51: Fix segfaults with function definition
Browse files Browse the repository at this point in the history
The Open Build Server was building PIE builds. These crashed.
Local dev builds were non-PIE and didn't crash.

Apparently, Vala/C will happily compile and let you reference a function
that wasn't defined in the header. And then it'll crash when it's
position independent (presumably because it can't guarantee where
the function will be in the same way).

By defining the get_quoted_medias function in the header file,
we fix the crash.
  • Loading branch information
IBBoard committed Oct 22, 2019
1 parent 864d165 commit 476631f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CbTweet.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ CbUserIdentity * cb_tweet_get_reply_users (CbTweet *tweet,

CbMedia ** cb_tweet_get_medias (CbTweet *tweet,
int *n_medias);
CbMedia ** cb_tweet_get_quoted_medias(CbTweet *tweet,
int *n_medias);
char ** cb_tweet_get_mentions (CbTweet *tweet,
int *n_mentions);
gboolean cb_tweet_has_inline_media (CbTweet *tweet);
Expand Down

0 comments on commit 476631f

Please sign in to comment.