Do not use a pointless compiler-internal __P() macro

This commit is contained in:
Petr Písař 2020-12-14 16:48:22 +01:00
parent 3c3fbd0f85
commit 96c8603e67
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,43 @@
From 1959f3768a284315250acd4d17a9f5ef0b8ea189 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Mon, 30 Nov 2020 16:35:26 +0100
Subject: [PATCH] Drop sys/cdefs.h usage
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
quota.h header includes sys/cdefs.h because it uses __P() macro in
quotactl syscall declaration. However glibc currently defines __P() is
nop and it only causes issues with other libc implementations (e.g. musl
libc). So just drop __P() usage and sys/cdefs.h include.
Reported-by: 2xsaiko <git@dblsaiko.net>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
quota.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/quota.h b/quota.h
index 4c21411..845cbbd 100644
--- a/quota.h
+++ b/quota.h
@@ -1,7 +1,6 @@
#ifndef GUARD_QUOTA_H
#define GUARD_QUOTA_H
-#include <sys/cdefs.h>
#include <sys/types.h>
#include <stdint.h>
@@ -182,6 +181,6 @@ enum {
#endif
#endif
-long quotactl __P((int, const char *, qid_t, caddr_t));
+long quotactl(int, const char *, qid_t, caddr_t);
#endif /* _QUOTA_ */
--
2.26.2

View File

@ -67,6 +67,8 @@ Patch3: quota-4.06-quotaops-fix-compilation-warning.patch
# Warn when kernel XFS large time stamp does fit into (32-bit) user-space
# time_t, in upstream after 4.06
Patch4: quota-4.06-quotaio_xfs-Warn-when-large-kernel-timestamps-cannot.patch
# Do not use a pointless compiler-internal __P() macro, in upstream after 4.06
Patch5: quota-4.06-Drop-sys-cdefs.h-usage.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bash
@ -192,6 +194,7 @@ Linux/UNIX environment.
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
# Regenerate build scripts
autoreconf -f -i
@ -346,6 +349,7 @@ make check
- Fix a compilation warning in quotaops.c
- Warn when kernel XFS large time stamp does fit into (32-bit) user-space
time_t
- Do not use a pointless compiler-internal __P() macro
* Tue Nov 10 2020 Petr Pisar <ppisar@redhat.com> - 1:4.06-1
- 4.06 bump