kumquat-buildroot/package/ltp-testsuite/0009-nfsv4-acl-Remove-unneeded-malloc-sizeof-FILE.patch
Petr Vorel eee5e432ed package/ltp-testsuite: backport 3 more musl related patches
0009-nfsv4-acl-Remove-unneeded-malloc-sizeof-FILE.patch is fixing
following reports (other 2 has not been reported due previous)

Fixes:
http://autobuild.buildroot.net/results/a38a5d8deaa365f73db427911df68dd10c6930a6
http://autobuild.buildroot.net/results/dfa173caea08876ab69dd959da146b75750cdd28
http://autobuild.buildroot.net/results/1e602f1574e9134a44d5d66838e7851b38e8069a
http://autobuild.buildroot.net/results/f1b4b129ec94795b2144b4501b4301fb20892e71

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-11-20 22:00:24 +01:00

38 lines
1.2 KiB
Diff

From 7eae073fda17a94a36893337b5a5d639024d571c Mon Sep 17 00:00:00 2001
From: Petr Vorel <petr.vorel@gmail.com>
Date: Sun, 17 Nov 2019 12:53:22 +0100
Subject: [PATCH] nfsv4/acl: Remove unneeded malloc(sizeof(FILE))
FILE incomplete type under musl (comply C11 [1]).
malloc(sizeof(FILE)) is not needed anyway, thus remove.
This fixes build on musl (at least):
acl1.c:51:23: error: invalid application of 'sizeof' to incomplete type 'FILE' {aka 'struct _IO_FILE'}
fptr = malloc(sizeof(FILE));
Fixes: 618fd23eb ("Initial add of acl testsuite from Bull")
[1] https://www.openwall.com/lists/musl/2019/01/16/1
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
[Upstream status: 7eae073fda17a94a36893337b5a5d639024d571c]
---
testcases/network/nfsv4/acl/acl1.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/testcases/network/nfsv4/acl/acl1.c b/testcases/network/nfsv4/acl/acl1.c
index bdf0180da..aae9484e5 100644
--- a/testcases/network/nfsv4/acl/acl1.c
+++ b/testcases/network/nfsv4/acl/acl1.c
@@ -48,7 +48,6 @@ int do_file_op(char *filename)
result = 0;
FILE *fptr;
char str[256] = "./";
- fptr = malloc(sizeof(FILE));
uid = geteuid();
strcat(str, filename);
--
2.23.0