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)
//