From 98b44ddd825ea797c0fe0e9ce64c4f9ad4febded Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 8 Aug 2012 23:00:10 +0200
Subject: [PATCH 1/3] Fix symlinkat for Darwin
---
src/build/libroot/fs_darwin.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/build/libroot/fs_darwin.cpp b/src/build/libroot/fs_darwin.cpp
index 89eb244..c4400da 100644
a
|
b
|
symlinkat(const char *oldPath, int fd, const char *newPath)
|
391 | 391 | return -1; |
392 | 392 | } |
393 | 393 | |
394 | | char oldFullPath[MAXPATHLEN]; |
395 | | if (get_path(fd, oldPath, oldFullPath) < 0) |
| 394 | // newPath is relative to the fd |
| 395 | char newFullPath[MAXPATHLEN]; |
| 396 | if (get_path(fd, newPath, newFullPath) < 0) |
396 | 397 | return -1; |
397 | 398 | |
398 | | return symlink(oldFullPath, newPath); |
| 399 | return symlink(oldPath, newFullPath); |
399 | 400 | } |
400 | 401 | |
401 | 402 | |