From b8caef69155fbe87def579305622b9718d7779dc Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 21 Feb 2024 13:43:56 -0800 Subject: [PATCH] Change `AT_FDCWD` from -1 to -100. Change the value of `AT_FDCWD` from -1 to -100. Either value should work, since the Haiku implementation currently interprets any negative value as `AT_FDCWD`, however -100 is preferable to -1 since -1 is used for error return values. fixes #18809 Change-Id: I53f273dd595c39ea9e4576b90adbbf7f555107cf Reviewed-on: https://review.haiku-os.org/c/haiku/+/7423 Tested-by: Commit checker robot Reviewed-by: waddlesplash --- headers/posix/fcntl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headers/posix/fcntl.h b/headers/posix/fcntl.h index 30cd8fb483..ba0baeb6ab 100644 --- a/headers/posix/fcntl.h +++ b/headers/posix/fcntl.h @@ -59,7 +59,7 @@ #define O_DIRECTORY 0x00200000 /* fail if not a directory */ /* flags for the *at() functions */ -#define AT_FDCWD (-1) /* CWD FD for the *at() functions */ +#define AT_FDCWD (-100) /* CWD FD for the *at() functions */ #define AT_SYMLINK_NOFOLLOW 0x01 /* fstatat(), fchmodat(), fchownat(), utimensat() */