aboutsummaryrefslogtreecommitdiffstats
path: root/init/init.c
diff options
context:
space:
mode:
authorturret <turret@duck.com>2023-12-18 22:17:07 -0600
committerturret <turret@duck.com>2023-12-18 22:17:07 -0600
commit419d3c7562892e7e636632a499e20ad602a651bc (patch)
tree6f49f41be20e326501081189d518a1c58548c373 /init/init.c
parentd04fc8f40347b8e2d1897d9ce3b261a6fe1f6f61 (diff)
downloaddiscord-bot-skeleton-419d3c7562892e7e636632a499e20ad602a651bc.tar.gz
discord-bot-skeleton-419d3c7562892e7e636632a499e20ad602a651bc.tar.bz2
discord-bot-skeleton-419d3c7562892e7e636632a499e20ad602a651bc.zip
init: global init curl while not multithreaded
Diffstat (limited to 'init/init.c')
-rw-r--r--init/init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/init/init.c b/init/init.c
index 806792f..fa0e32f 100644
--- a/init/init.c
+++ b/init/init.c
@@ -5,6 +5,8 @@
#include <sys/resource.h>
#include <sys/wait.h>
+#include <curl/curl.h>
+
#include <config.h>
#include <init.h>
#include <log.h>
@@ -86,6 +88,10 @@ int main(void)
strcpy(token, "Authorization: Bot ");
strcat(token, token_base);
+ /* init curl */
+ if(curl_global_init(CURL_GLOBAL_DEFAULT))
+ panic("init: curl init failed");
+
/* Rest of the program.. */
do_initcalls();