forked from pool/glibc
Andreas Schwab
4d4a3834ee
- ld-show-auxv-colon.patch: elf: Fix missing colon in LD_SHOW_AUXV output (BZ #282539 - x86-string-control-test.patch: x86-64: Use testl to check __x86_string_control - pthread-kill-fail-after-exit.patch: nptl: pthread_kill, pthread_cancel should not fail after exit (BZ #19193) - pthread-kill-race-thread-exit.patch: nptl: Fix race between pthread_kill and thread exit (BZ #12889) - getcwd-attribute-access.patch: posix: Fix attribute access mode on getcwd (BZ #27476) - pthread-kill-return-esrch.patch: nptl: pthread_kill needs to return ESRCH for old programs (BZ #19193) - pthread-mutexattr-getrobust-np-type.patch: nptl: Fix type of pthread_mutexattr_getrobust_np, pthread_mutexattr_setrobust_np (BZ #28036) - setxid-deadlock-blocked-signals.patch: nptl: Avoid setxid deadlock with blocked signals in thread exit (BZ #28361) - pthread-kill-send-specific-thread.patch: nptl: pthread_kill must send signals to a specific thread (BZ #28407) - sysconf-nprocessors-affinity.patch: linux: Revert the use of sched_getaffinity on get_nproc (BZ #28310) - iconv-charmap-close-output.patch: renamed from icon-charmap-close-output.patch OBS-URL: https://build.opensuse.org/request/show/923222 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=604
51 lines
1.9 KiB
Diff
51 lines
1.9 KiB
Diff
From 433ec4f14a5753c7689c83c20c9972915c53c204 Mon Sep 17 00:00:00 2001
|
|
From: Aurelien Jarno <aurelien@aurel32.net>
|
|
Date: Fri, 10 Sep 2021 19:39:35 +0200
|
|
Subject: [PATCH] posix: Fix attribute access mode on getcwd [BZ #27476]
|
|
|
|
There is a GNU extension that allows to call getcwd(NULL, >0). It is
|
|
described in the documentation, but also directly in the unistd.h
|
|
header, just above the declaration.
|
|
|
|
Therefore the attribute access mode added in commit 06febd8c6705
|
|
is not correct. Drop it.
|
|
---
|
|
posix/bits/unistd.h | 5 ++---
|
|
posix/unistd.h | 3 +--
|
|
2 files changed, 3 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/posix/bits/unistd.h b/posix/bits/unistd.h
|
|
index f0831386c7..622adeb2b2 100644
|
|
--- a/posix/bits/unistd.h
|
|
+++ b/posix/bits/unistd.h
|
|
@@ -199,10 +199,9 @@ __NTH (readlinkat (int __fd, const char *__restrict __path,
|
|
#endif
|
|
|
|
extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
|
|
- __THROW __wur __attr_access ((__write_only__, 1, 2));
|
|
+ __THROW __wur;
|
|
extern char *__REDIRECT_NTH (__getcwd_alias,
|
|
- (char *__buf, size_t __size), getcwd)
|
|
- __wur __attr_access ((__write_only__, 1, 2));
|
|
+ (char *__buf, size_t __size), getcwd) __wur;
|
|
extern char *__REDIRECT_NTH (__getcwd_chk_warn,
|
|
(char *__buf, size_t __size, size_t __buflen),
|
|
__getcwd_chk)
|
|
diff --git a/posix/unistd.h b/posix/unistd.h
|
|
index 3dca65732f..8224c5fbc9 100644
|
|
--- a/posix/unistd.h
|
|
+++ b/posix/unistd.h
|
|
@@ -528,8 +528,7 @@ extern int fchdir (int __fd) __THROW __wur;
|
|
an array is allocated with `malloc'; the array is SIZE
|
|
bytes long, unless SIZE == 0, in which case it is as
|
|
big as necessary. */
|
|
-extern char *getcwd (char *__buf, size_t __size) __THROW __wur
|
|
- __attr_access ((__write_only__, 1, 2));
|
|
+extern char *getcwd (char *__buf, size_t __size) __THROW __wur;
|
|
|
|
#ifdef __USE_GNU
|
|
/* Return a malloc'd string containing the current directory name.
|
|
--
|
|
2.33.0
|
|
|