Commit c2fd6b96 authored by Johan Ström's avatar Johan Ström

MacOS build fix

parent 49d369c4
Pipeline #414 passed with stage
......@@ -50,7 +50,9 @@ else()
set (CONFDIR ${ETCDIR}/opt/agocontrol CACHE STRING "Directory for agocontrol settings")
set (DATADIR /var/opt/agocontrol CACHE STRING "Directory for variable data")
set (LOCALSTATEDIR /var/opt/agocontrol CACHE STRING "Directory for state info")
set (CMAKE_EXE_LINKER_FLAGS "-Wl,-z,now")
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
set (CMAKE_EXE_LINKER_FLAGS "-Wl,-z,now")
endif()
endif()
# Common structure
......
......@@ -20,7 +20,7 @@
#include <termios.h>
#include <errno.h>
#include <stdlib.h>
#ifndef __FreeBSD__
#if !defined(__FreeBSD__) && !defined(__APPLE__)
#include <sys/sysinfo.h>
#endif
......@@ -191,7 +191,7 @@ Json::Value AgoResolver::getDefaultParameters()
}
void AgoResolver::get_sysinfo() {
#ifndef __FreeBSD__
#if !defined(__FreeBSD__) && !defined(__APPLE__)
/* Note on FreeBSD exclusion. Sysinfo.h does not exist, but the code below
* does not really use it anyway.. so just skip it.
*/
......
......@@ -571,7 +571,7 @@ boost::shared_ptr<HttpReqRep> AgoRpc::uploadFiles(struct mg_connection *conn, st
AGO_ERROR() << "Uploaded file \"" << tempfile.string() << "\" not fully written (no space left?)";
FILE_UPLOAD_ERROR("Failed to write file, no space left?");
}else{
request["filesize"] = data_len;
request["filesize"] = (Json::UInt64)data_len;
response["size"] = (Json::UInt64)data_len;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment