From 3536634878a3ea1e22f24f10c6bf51524eff6099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20P=C3=B6chtrager?= Date: Thu, 22 Sep 2016 20:22:43 +0200 Subject: [PATCH] Update cctools-ld64-cygwin-buildfix.patch --- patches/cctools-ld64-cygwin-buildfix.patch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/patches/cctools-ld64-cygwin-buildfix.patch b/patches/cctools-ld64-cygwin-buildfix.patch index 0a24aac..772e416 100644 --- a/patches/cctools-ld64-cygwin-buildfix.patch +++ b/patches/cctools-ld64-cygwin-buildfix.patch @@ -37,10 +37,12 @@ diff --git usage_examples/ios_toolchain/wrapper.c usage_examples/ios_toolchain/w index c102d79..b88d35a 100644 --- usage_examples/ios_toolchain/wrapper.c +++ usage_examples/ios_toolchain/wrapper.c -@@ -86,6 +86,7 @@ char *get_executable_path(char *epath, size_t buflen) +@@ -85,7 +85,8 @@ char *get_executable_path(char *epath, size_t buflen) + if (!ok) return NULL; l = strlen(epath); #else - ssize_t l = readlink("/proc/self/exe", epath, buflen); +- ssize_t l = readlink("/proc/self/exe", epath, buflen); ++ ssize_t l = readlink("/proc/self/exe", epath, buflen - 1); + if (l > 0) epath[l] = '\0'; #endif if (l <= 0) return NULL;