diff options
author | midipix <writeonce@midipix.org> | 2016-04-10 18:32:30 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-04-11 14:00:18 -0400 |
commit | e0a0450b8764d54303d927e18aee1f038bcf66f7 (patch) | |
tree | ab5ba6f2b4ed70880d254b44602a6b4455d1f33a /src/internal/slibtool_symlink_impl.c | |
parent | f22545d4ff7c89eb4e310373bc832aa48120df35 (diff) | |
download | slibtool-e0a0450b8764d54303d927e18aee1f038bcf66f7.tar.bz2 slibtool-e0a0450b8764d54303d927e18aee1f038bcf66f7.tar.xz |
slbt_create_symlink(): make the type of lnkname more convenient to callers.
Diffstat (limited to 'src/internal/slibtool_symlink_impl.c')
-rw-r--r-- | src/internal/slibtool_symlink_impl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/internal/slibtool_symlink_impl.c b/src/internal/slibtool_symlink_impl.c index 50b2387..91fff1a 100644 --- a/src/internal/slibtool_symlink_impl.c +++ b/src/internal/slibtool_symlink_impl.c @@ -15,13 +15,14 @@ int slbt_create_symlink( const struct slbt_driver_ctx * dctx, struct slbt_exec_ctx * ectx, const char * target, - char * lnkname, + const char * lnkname, bool flawrapper) { const char * slash; char * ln[5]; char * dotdot; char tmplnk [PATH_MAX]; + char lnkarg [PATH_MAX]; char atarget[PATH_MAX]; /* atarget */ @@ -41,11 +42,14 @@ int slbt_create_symlink( lnkname) >= sizeof(tmplnk)) return -1; + /* lnkarg */ + strcpy(lnkarg,lnkname); + /* ln argv (fake) */ ln[0] = "ln"; ln[1] = "-s"; ln[2] = atarget; - ln[3] = lnkname; + ln[3] = lnkarg; ln[4] = 0; ectx->argv = ln; |