diff options
author | obadz <obadz-git@obadz.com> | 2016-06-20 20:54:17 +0100 |
---|---|---|
committer | obadz <obadz-git@obadz.com> | 2016-06-20 21:41:59 +0100 |
commit | fb6b4860c759380f2a61dd36814f159004aea361 (patch) | |
tree | 04ef00391a7a1bc7d6c7a9b3890e385c9ff90e08 /pkgs/build-support/libredirect | |
parent | c8d3b166f57710e22caada90c31cf5e8df50a2d1 (diff) |
xl2tpd: add nixos module for service
(required adding execv to libredirect)
Diffstat (limited to 'pkgs/build-support/libredirect')
-rw-r--r-- | pkgs/build-support/libredirect/libredirect.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/build-support/libredirect/libredirect.c b/pkgs/build-support/libredirect/libredirect.c index e60319d09717d..ed0d5b0043d58 100644 --- a/pkgs/build-support/libredirect/libredirect.c +++ b/pkgs/build-support/libredirect/libredirect.c @@ -137,3 +137,10 @@ int posix_spawn(pid_t * pid, const char * path, char buf[PATH_MAX]; return posix_spawn_real(pid, rewrite(path, buf), file_actions, attrp, argv, envp); } + +int execv(const char *path, char *const argv[]) +{ + int (*execv_real) (const char *path, char *const argv[]) = dlsym(RTLD_NEXT, "execv"); + char buf[PATH_MAX]; + return execv_real(rewrite(path, buf), argv); +} |