aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2012-12-12 15:53:05 -0600
committerPeter Seebach <peter.seebach@windriver.com>2012-12-12 15:53:05 -0600
commit8b1afe44d92379eb9d01c783b9a396925dcc9193 (patch)
tree2c9b102f1bc1e6b3ed4116d198d80992f77d9af5
parent874bea3c664161c2297d5d5f4f93408330e005f5 (diff)
downloadpseudo-8b1afe44d92379eb9d01c783b9a396925dcc9193.tar.gz
pseudo-8b1afe44d92379eb9d01c783b9a396925dcc9193.tar.bz2
pseudo-8b1afe44d92379eb9d01c783b9a396925dcc9193.zip
bitrot and linkat() fixes for Darwin.SEEBS_TESTING
-rw-r--r--ChangeLog.txt2
-rw-r--r--ports/darwin/wrapfuncs.in2
-rw-r--r--pseudo.h9
3 files changed, 8 insertions, 5 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 3216c96..9ab6b88 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -6,6 +6,8 @@
the documentation and behavior of link(2) to reflect host
OS semantics: Linux will hardlink symlinks, Darwin will only
hardlink their targets.
+ * (seebs) make linkat() implementation compile/run on Darwin,
+ fix header bitrot for Mountain Lion.
2012-08-09:
* (seebs) base_stat should be real_stat64, not stat64
diff --git a/ports/darwin/wrapfuncs.in b/ports/darwin/wrapfuncs.in
index 39d9893..5cc4aaf 100644
--- a/ports/darwin/wrapfuncs.in
+++ b/ports/darwin/wrapfuncs.in
@@ -17,7 +17,7 @@ int setxattr(const char *pathname, const char *name, const void *value, size_t s
int fsetxattr(int filedes, const char *name, const void *value, size_t size, u_int32_t position, int options);
# local color UIDs
int getgrouplist(const char *name, int basegid, int *groups, int *ngroups);
-int scandir(const char *path, struct dirent ***namelist, int (*filter)(struct dirent *), int (*compar)());
+int scandir(const char *path, struct dirent ***namelist, int (*filter)(const struct dirent *), int (*compar)());
int getgroups(int size, gid_t *list);
int fgetgrent_r(FILE *fp, struct group *gbuf, char *buf, size_t buflen, struct group **gbufp); /* real_func=pseudo_fgetgrent_r */
int fgetpwent_r(FILE *fp, struct passwd *pbuf, char *buf, size_t buflen, struct passwd **pbufp); /* real_func=pseudo_fgetpwent_r */
diff --git a/pseudo.h b/pseudo.h
index 5c3eabe..9d3e43f 100644
--- a/pseudo.h
+++ b/pseudo.h
@@ -93,14 +93,15 @@ extern char *pseudo_version;
* terms of each other, and for instance, open(...) is the same as
* openat(AT_FDCWD, ...). If no AT_FDCWD is provided, any value that can't
* be a valid file descriptor will do. Using -2 because -1 could be
- * mistaken for a failed syscall return. Similarly, any value which isn't
- * zero will do to fake AT_SYMLINK_NOFOLLOW. Finally, if this happened,
- * we set our own flag we can use to indicate that dummy implementations
- * of the _at functions are needed.
+ * mistaken for a failed syscall return. AT_SYMLINK_NOFOLLOW has to be
+ * non-zero; AT_SYMLINK_FOLLOW has to be non-zero and different. Finally,
+ * if this happened, we set our own flag we can use to indicate that dummy
+ * implementations of the _at functions are needed.
*/
#ifndef AT_FDCWD
#define AT_FDCWD -2
#define AT_SYMLINK_NOFOLLOW 1
+#define AT_SYMLINK_FOLLOW 2
#define PSEUDO_NO_REAL_AT_FUNCTIONS
#endif