From 017bebe2be723ff6c199fcb70b92c9ce9c0d7003 Mon Sep 17 00:00:00 2001 From: Eric Wertz Date: Fri, 30 May 2025 19:49:49 -0400 Subject: [PATCH] more updates to get linux build to work --- backend/HTTPResponse.cpp | 5 ++++- backend/User.cpp | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/HTTPResponse.cpp b/backend/HTTPResponse.cpp index b0e9971..c7b43da 100644 --- a/backend/HTTPResponse.cpp +++ b/backend/HTTPResponse.cpp @@ -21,7 +21,10 @@ CHTTPResponse::CHTTPResponse(const CHTTPRequest& request) : _request(request) if (_wwwDir == "") { char resolved_path[PATH_MAX]; - realpath("www/", resolved_path); + if( realpath("www/", resolved_path) == NULL ) + { + die("Failed to resolve path"); + } _wwwDir = std::string(resolved_path) + "/"; } } diff --git a/backend/User.cpp b/backend/User.cpp index 9bc082c..04c4eb0 100644 --- a/backend/User.cpp +++ b/backend/User.cpp @@ -9,6 +9,7 @@ #include #include // Required for std::istringstream #include +#include #define SESSION_ID_LENGTH 32 -- 2.49.0