@@ -0,0 +1,37 @@
+diff --git a/src/csync_config.c b/src/csync_config.c
+index 3fcc069..9d6834a 100644
+--- a/src/csync_config.c
++++ b/src/csync_config.c
+@@ -125,26 +125,26 @@ int csync_config_load(CSYNC *ctx, const char *config) {
+ }
+ }
+
+- dict = iniparser_load(config);
++ dict = iniparser_load((char*)config);
+ if (dict == NULL) {
+ return -1;
+ }
+
+- ctx->options.max_depth = iniparser_getint(dict, "global:max_depth", MAX_DEPTH);
++ ctx->options.max_depth = iniparser_getint(dict, (char*)"global:max_depth", MAX_DEPTH);
+ CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Config: max_depth = %d",
+ ctx->options.max_depth);
+
+ ctx->options.max_time_difference = iniparser_getint(dict,
+- "global:max_time_difference", MAX_TIME_DIFFERENCE);
++ (char*)"global:max_time_difference", MAX_TIME_DIFFERENCE);
+ CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Config: max_time_difference = %d",
+ ctx->options.max_time_difference);
+
+ ctx->options.sync_symbolic_links = iniparser_getboolean(dict,
+- "global:sync_symbolic_links", 0);
++ (char*)"global:sync_symbolic_links", 0);
+ CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Config: sync_symbolic_links = %d",
+ ctx->options.sync_symbolic_links);
+
+- ctx->options.timeout = iniparser_getint(dict, "global:timeout", 0);
++ ctx->options.timeout = iniparser_getint(dict, (char*)"global:timeout", 0);
+ CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Config: timeout = %d",
+ ctx->options.timeout);
+
+
|
@@ -0,0 +1,38 @@
+--- ocsync-0.70.4/src/csync_lock.c.orig 2013-02-20 17:39:16.000000000 +0100
++++ ocsync-0.70.4/src/csync_lock.c 2013-02-26 17:47:48.574645800 +0100
+@@ -29,7 +29,6 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <signal.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+@@ -123,12 +122,13 @@
+
+ static pid_t _csync_lock_read(CSYNC *ctx, const char *lockfile) {
+ char errbuf[256] = {0};
+- char buf[8] = {0};
++ char buf[16] = {0};
+ long int tmp;
+ ssize_t rc;
+ int fd;
+ pid_t pid;
+ const _TCHAR *wlockfile;
++ struct stat sts;
+
+ /* Read PID from existing lock */
+ #ifdef _WIN32
+@@ -165,7 +165,11 @@
+ pid = (pid_t)(tmp & 0xFFFF);
+
+ /* Check if process is still alive */
+- if (kill(pid, 0) < 0 && errno == ESRCH) {
++ if (snprintf(buf, sizeof(buf), "/proc/%d", pid) < 0) {
++ return -1;
++ }
++
++ if (stat(buf, &sts)== -1 && errno ==ENOENT) {
+ /* Process is dead. Remove stale lock. */
+ if (unlink(lockfile) < 0) {
+ strerror_r(errno, errbuf, sizeof(errbuf));
|