Commit 481b198692 for perl
commit 481b198692f318b674e29cfb03453b0f31148b50
Author: Lukas Mai <lukasmai.403@gmail.com>
Date: Wed Nov 25 22:14:42 2026 +0100
Fcntl: add O_PATH
diff --git a/ext/Fcntl/Fcntl.pm b/ext/Fcntl/Fcntl.pm
index 2dc2a2e69d..ca3b52a336 100644
--- a/ext/Fcntl/Fcntl.pm
+++ b/ext/Fcntl/Fcntl.pm
@@ -4,7 +4,7 @@ use strict;
use Exporter 'import';
require XSLoader;
-our $VERSION = '1.21';
+our $VERSION = '1.22';
XSLoader::load();
@@ -136,6 +136,7 @@ our @EXPORT_OK = (qw(
O_NOLINK
O_NOSIGPIPE
O_NOTRANS
+ O_PATH
O_SYMLINK
O_TMPFILE
O_TTY_INIT
@@ -589,6 +590,15 @@ C<EPIPE> instead.
(Hurd) If the file to be opened is specially translated, don't invoke the
translator; open the bare file itself.
+=item C<O_PATH>
+
+(Linux, FreeBSD) Create a file descriptor that can be used to refer to a
+location in the file system (e.g. for use with L<fchdir(2)> or L<fstat(2)>),
+but does not provide access to the file's contents.
+
+Flags other than C<O_CLOEXEC>, C<O_DIRECTORY>, and C<O_NOFOLLOW> are ignored
+when used together with C<O_PATH>.
+
=item C<O_RANDOM>
(Windows) Indicate that the program intends to access the file contents
diff --git a/ext/Fcntl/Makefile.PL b/ext/Fcntl/Makefile.PL
index b80060eb14..0ecee399d9 100644
--- a/ext/Fcntl/Makefile.PL
+++ b/ext/Fcntl/Makefile.PL
@@ -25,7 +25,7 @@ my @names = (
O_CREAT O_DEFER O_DIRECT O_DIRECTORY O_DSYNC O_EVTONLY O_EXCL
O_EXLOCK O_IGNORE_CTTY O_LARGEFILE O_NDELAY O_NOATIME
O_NOCTTY O_NOFOLLOW O_NOINHERIT O_NOLINK O_NONBLOCK O_NOSIGPIPE
- O_NOTRANS O_RANDOM O_RAW O_RDONLY O_RDWR O_RSRC O_RSYNC
+ O_NOTRANS O_PATH O_RANDOM O_RAW O_RDONLY O_RDWR O_RSRC O_RSYNC
O_SEQUENTIAL O_SHLOCK O_SYMLINK O_SYNC O_TEMPORARY O_TEXT
O_TMPFILE O_TRUNC O_TTY_INIT O_WRONLY S_ENFMT S_IEXEC S_IFBLK
S_IFCHR S_IFDIR S_IFIFO S_IFLNK S_IFREG S_IFSOCK S_IFWHT S_IREAD
diff --git a/t/porting/known_pod_issues.dat b/t/porting/known_pod_issues.dat
index f8fc44b91a..93130f0f7d 100644
--- a/t/porting/known_pod_issues.dat
+++ b/t/porting/known_pod_issues.dat
@@ -150,6 +150,7 @@ fopen(3)
fork(2)
fread(3)
fseek(3)
+fstat(2)
fsync(2)
fsync(3c)
Function::Parameters