diff --git a/inc/FileObject.h b/inc/FileObject.h
index b3b8a8ad0f55e632ad34dea6cae6af53e4ca8063..059190e046634b265f07fe2581f4770a58d2863d 100644
--- a/inc/FileObject.h
+++ b/inc/FileObject.h
@@ -4,6 +4,7 @@
 #include <iostream>
 #include <string>
 #include <stdio.h>
+#include <string.h>
 #include <stdlib.h>
 #include <fstream>
 #include <unistd.h>
diff --git a/src/TcpSocket.cpp b/src/TcpSocket.cpp
index d69112beafa628b853e3683883255dfdf4dcb8cd..c2a9b96dc0f7221f6c07929ea7fb09d7a2a84855 100644
--- a/src/TcpSocket.cpp
+++ b/src/TcpSocket.cpp
@@ -145,7 +145,7 @@ void TcpSocket::sendLines(string ip, string port, string execfile, string readfi
 		perror("send");
 	}
 	sleep(1);
-	ifstream file(getMostRecentFile(readfile));
+	ifstream file(getMostRecentFile(readfile).c_str());
     string str;
     while (getline(file, str))
     {