From 6e5b7da699c88a730f648322c59e00401601401e Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 19 Jan 2018 20:51:40 -0800 Subject: [PATCH] Make the client simulator build again. Note: any file that refers to HAVE_* symbols should include config.h --- client/makefile_sim | 3 +++ client/sim.cpp | 2 +- lib/parse.h | 2 ++ lib/str_replace.h | 9 ++------- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/makefile_sim b/client/makefile_sim index 6af9d0185a..d471c87263 100644 --- a/client/makefile_sim +++ b/client/makefile_sim @@ -39,6 +39,7 @@ OBJS = \ net_stats.o \ pers_file_xfer.o \ project.o \ + project_list.o \ result.o \ rr_sim.o \ sandbox.o \ @@ -54,6 +55,7 @@ OBJS = \ ../lib/crypt.o \ ../lib/filesys.o \ ../lib/hostinfo.o \ + ../lib/keyword.o \ ../lib/md5.o \ ../lib/md5_file.o \ ../lib/mfile.o \ @@ -64,6 +66,7 @@ OBJS = \ ../lib/opencl_boinc.o \ ../lib/parse.o \ ../lib/prefs.o \ + ../lib/project_init.o \ ../lib/proxy_info.o \ ../lib/shmem.o \ ../lib/str_util.o \ diff --git a/client/sim.cpp b/client/sim.cpp index 096756dfc3..b65c790612 100644 --- a/client/sim.cpp +++ b/client/sim.cpp @@ -385,7 +385,7 @@ bool CLIENT_STATE::simulate_rpc(PROJECT* p) { app_versions[i]->dont_use = false; } - work_fetch.request_string(buf2); + work_fetch.request_string(buf2, sizeof(buf2)); sprintf(buf, "RPC to %s: %s
", p->project_name, buf2); html_msg += buf; diff --git a/lib/parse.h b/lib/parse.h index cef3eae947..28674f2469 100644 --- a/lib/parse.h +++ b/lib/parse.h @@ -23,6 +23,8 @@ #include #include +#include "config.h" + #include "miofile.h" #include "error_numbers.h" #include "str_util.h" diff --git a/lib/str_replace.h b/lib/str_replace.h index 1be8bfb821..d53f4a88c2 100644 --- a/lib/str_replace.h +++ b/lib/str_replace.h @@ -20,18 +20,13 @@ #ifndef BOINC_STR_REPLACE_H #define BOINC_STR_REPLACE_H -#if (defined(HAVE_CONFIG_H) || defined(__APPLE__)) -#include "config.h" -#endif - #ifndef _WIN32 #include -#endif - -#ifdef __APPLE__ #include #endif +#include "config.h" + // strlcpy and strlcat guarantee NULL-terminated result // (unlike strncpy and strncat) //