From 6d391f9ef2d2588ae2faf0efb73bd1ac934b063a Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 14 Jan 2018 23:54:49 -0600
Subject: readlink: Intercept readlink("/proc/self/exe")

This allows programs run through gcompat to fork and re-exec themselves.
It fixes readlink("/proc/self/exe") to return the executable's absolute
path, instead of musl's path.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

(limited to 'Makefile')

diff --git a/Makefile b/Makefile
index 5e5a12e..b6bee29 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,7 @@ LIBGCOMPAT_SRC = \
 	libgcompat/netdb.c		\
 	libgcompat/pthread.c		\
 	libgcompat/pwd.c		\
+	libgcompat/readlink.c		\
 	libgcompat/resolv.c		\
 	libgcompat/resource.c		\
 	libgcompat/setjmp.c		\
-- 
cgit v1.2.3-70-g09d2