From e1e6f2db51fc32ef9d423ed6a97f1ef4a7955911 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 21 May 2020 05:10:19 +0200 Subject: [PATCH] Fix CXX_BUILD --- deps/discord-rpc/src/discord_rpc.cpp | 6 ++++-- network/discord.c | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/deps/discord-rpc/src/discord_rpc.cpp b/deps/discord-rpc/src/discord_rpc.cpp index 23b885f08e..3f430bed16 100644 --- a/deps/discord-rpc/src/discord_rpc.cpp +++ b/deps/discord-rpc/src/discord_rpc.cpp @@ -1,3 +1,4 @@ +#include #include "discord_rpc.h" #include "backoff.h" @@ -14,15 +15,16 @@ #include #endif + /* Forward declarations */ -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(CXX_BUILD) extern "C" { #endif void Discord_Register(const char *a, const char *b); void Discord_RegisterSteamGame(const char *a, const char *b); -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(CXX_BUILD) } #endif diff --git a/network/discord.c b/network/discord.c index 89ac517c53..92f6234378 100644 --- a/network/discord.c +++ b/network/discord.c @@ -13,6 +13,8 @@ * If not, see . */ +#include + #include #include #include @@ -89,14 +91,13 @@ static discord_state_t discord_st; #define CDN_URL "https://cdn.discordapp.com/avatars" /* Forward declarations */ -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(CXX_BUILD) extern "C" { #endif void Discord_Register(const char *a, const char *b); -void Discord_RegisterSteamGame(const char *a, const char *b); -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(CXX_BUILD) } #endif