aboutsummaryrefslogtreecommitdiffstats
path: root/main/lsyncd/fix-realpath.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-10-10 09:04:52 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-10-10 09:04:52 +0000
commit7e2656ed1d22d113658b0b343d5b65570b71fb3f (patch)
tree9ebbbf74558391fc0cb9862110b84b041a9032ee /main/lsyncd/fix-realpath.patch
parentca6ee3c388db2d91fbcf23d69a599117ea23f604 (diff)
downloadaports-7e2656ed1d22d113658b0b343d5b65570b71fb3f.tar.bz2
aports-7e2656ed1d22d113658b0b343d5b65570b71fb3f.tar.xz
main/lsyncd: fix musl build
Diffstat (limited to 'main/lsyncd/fix-realpath.patch')
-rw-r--r--main/lsyncd/fix-realpath.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/main/lsyncd/fix-realpath.patch b/main/lsyncd/fix-realpath.patch
new file mode 100644
index 0000000000..66132f26e4
--- /dev/null
+++ b/main/lsyncd/fix-realpath.patch
@@ -0,0 +1,20 @@
+--- lsyncd-2.0.7.orig/lsyncd.c
++++ lsyncd-2.0.7/lsyncd.c
+@@ -166,17 +166,7 @@
+ char *
+ get_realpath(const char * rpath) {
+ // uses c-library to get the absolute path
+-#ifdef __GLIBC__
+- // in case of GLIBC the task is easy.
+ return realpath(rpath, NULL);
+-#else
+-# warning having to use old style realpath()
+- // otherwise less so and requires PATH_MAX limit.
+- char buf[PATH_MAX];
+- char *asw = realpath(rpath, buf);
+- if (!asw) return NULL;
+- return s_strdup(asw);
+-#endif
+ }
+
+ /*****************************************************************************