From 758d235039646cd6fda62558b5d4637645cbc4fd Mon Sep 17 00:00:00 2001 From: Tanvir Ahmed Anas Date: Wed, 24 Jan 2024 17:11:08 +0400 Subject: [PATCH] build: Fixed issues in ConfigParser::parseJSON for linux --- includes/webserv.hpp | 2 +- parser/ConfigParser.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/webserv.hpp b/includes/webserv.hpp index 3bb1561..e280564 100644 --- a/includes/webserv.hpp +++ b/includes/webserv.hpp @@ -1,13 +1,13 @@ #ifndef WEBSERV_HPP #define WEBSERV_HPP - /* --------------------------------- MACROS --------------------------------- */ #define to_str(name) #name /* -------------------------------- INCLUDES -------------------------------- */ #include #include +#include #include "debug.hpp" /* ----------------------------- ERROR MESSAGES ----------------------------- */ diff --git a/parser/ConfigParser.cpp b/parser/ConfigParser.cpp index 90879a5..4adba24 100644 --- a/parser/ConfigParser.cpp +++ b/parser/ConfigParser.cpp @@ -7,7 +7,7 @@ ConfigParser::~ConfigParser() {} void ConfigParser::parseJSON(std::string file) { std::cout << "Parsing config file: " << file << std::endl; - std::ifstream inputFileStream(file); + std::ifstream inputFileStream(file.c_str()); if (inputFileStream.fail()) { std::cerr << ERR_OPEN << std::endl; exit(1);