From a9142e884bd1676953c05213a667c9977ca07a6b Mon Sep 17 00:00:00 2001 From: Oleksii Shevchuk Date: Tue, 4 Apr 2017 22:16:45 +0300 Subject: [PATCH] Make c99 happy --- client/sources-linux/tmplibrary.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/sources-linux/tmplibrary.c b/client/sources-linux/tmplibrary.c index c67be7ca..9e4adfd9 100644 --- a/client/sources-linux/tmplibrary.c +++ b/client/sources-linux/tmplibrary.c @@ -352,9 +352,11 @@ void *memdlopen(const char *soname, const char *buffer, size_t size) { #ifndef NO_MEMFD_DLOPEN_WORKAROUND if (is_memfd) { + int i; + char fake_path[PATH_MAX] = {}; snprintf(fake_path, sizeof(fake_path), "/dev/shm/memfd:%s", soname); - for (int i=16; fake_path[i]; i++) + for (i=16; fake_path[i]; i++) if (fake_path[i] == '/') fake_path[i] = '!';