* lib/progreloc.c (O_EXEC) [O_PATH]: Default to O_PATH. This tracks the recent change to fcntl-h. Perhaps relocatable-prog should depend on fcntl-h instead? --- ChangeLog | 5 +++++ lib/progreloc.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog index 3576e7a..64dab14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2012-11-05 Paul Eggert <[email protected]> + relocatable-prog: default O_EXEC to O_PATH if available + * lib/progreloc.c (O_EXEC) [O_PATH]: Default to O_PATH. + This tracks the recent change to fcntl-h. + Perhaps relocatable-prog should depend on fcntl-h instead? + fcntl-h: default O_SEARCH, O_EXEC to O_PATH if available Linux kernel 2.6.39 introduced O_PATH (see <http://lwn.net/Articles/433854/>) and this is a better fallback diff --git a/lib/progreloc.c b/lib/progreloc.c index c6a541f..1519602 100644 --- a/lib/progreloc.c +++ b/lib/progreloc.c @@ -61,7 +61,11 @@ #endif #ifndef O_EXEC -# define O_EXEC O_RDONLY /* This is often close enough in older systems. */ +# ifdef O_PATH +# define O_EXEC O_PATH +# else +# define O_EXEC O_RDONLY /* This is often close enough in older systems. */ +# endif #endif /* Declare canonicalize_file_name. -- 1.7.11.7
