]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
mlock, mlock2, munlock: Use __attr_access_none macro
authorSam James <sam@gentoo.org>
Thu, 2 Jan 2025 17:26:28 +0000 (17:26 +0000)
committerSam James <sam@gentoo.org>
Thu, 2 Jan 2025 17:58:06 +0000 (17:58 +0000)
This fixes build failures using GCC 7.5.0 against glibc headers,
see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118194#c5.

Followup to 013106ae677af9836614ace1a01d25b63fa555a7.

Reported-by: vvinayag@arm.com
misc/sys/mman.h
sysdeps/unix/sysv/linux/bits/mman-shared.h

index a2eaf69c82ca2f3cc069d13215cab8836bf47517..de5cb8976f0138e9109e8cdee8e2cbd3c6979f88 100644 (file)
@@ -101,11 +101,11 @@ extern int posix_madvise (void *__addr, size_t __len, int __advice) __THROW;
 /* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to
    be memory resident.  */
 extern int mlock (const void *__addr, size_t __len) __THROW
-    __attr_access ((__none__, 1));
+    __attr_access_none (1);
 
 /* Unlock whole pages previously mapped by the range [ADDR,ADDR+LEN).  */
 extern int munlock (const void *__addr, size_t __len) __THROW
-    __attr_access ((__none__, 1));
+    __attr_access_none (1);
 
 /* Cause all currently mapped pages of the process to be memory resident
    until unlocked by a call to the `munlockall', until the process exits,
index bfbccc14d6b0cecc58242e35b09ef39a61e9103e..31590979b92c476d41eba2e55c010a6c2522dae3 100644 (file)
@@ -57,7 +57,7 @@ int memfd_create (const char *__name, unsigned int __flags) __THROW;
 /* Lock pages from ADDR (inclusive) to ADDR + LENGTH (exclusive) into
    memory.  FLAGS is a combination of the MLOCK_* flags above.  */
 int mlock2 (const void *__addr, size_t __length, unsigned int __flags) __THROW
-    __attr_access ((__none__, 1));
+    __attr_access_none (1);
 
 /* Allocate a new protection key, with the PKEY_DISABLE_* bits
    specified in ACCESS_RESTRICTIONS.  The protection key mask for the