Skip to content

Commit c8e8f83

Browse files
committed
fix: fix discord social sdk compilation on mingw
1 parent bf1c56d commit c8e8f83

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

subprojects/discord-social-sdk.wrap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ source_url = https://oopetris.totto.lt/static/assets/discord/DiscordSocialSdk-1.
44
source_filename = DiscordSocialSdk-1.1.8318.zip
55
source_hash = e78ac5c6462d74917b74d2511ed88876f59dbe00d31186590a98ea7953099e31
66
patch_directory = discord_social_sdk
7+
diff_files = discord_social_sdk-1.1.8318_mingw.diff
78

89
[provide]
910
discord-social-sdk = discord_social_sdk_dep
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/include/cdiscord.h b/include/cdiscord.h
2+
index 534a85f..2ba5d7f 100644
3+
--- a/include/cdiscord.h
4+
+++ b/include/cdiscord.h
5+
@@ -10,7 +10,9 @@
6+
#ifndef DISCORD_API
7+
#if defined(_WIN32)
8+
#define DISCORD_API __declspec(dllexport)
9+
+#if ! defined(__MINGW32__)
10+
#pragma warning(disable : 4251)
11+
+#endif
12+
#else
13+
#define DISCORD_API __attribute__((visibility("default")))
14+
#endif

0 commit comments

Comments
 (0)