All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/tcg/multiarch: Define _LARGEFILE64_SOURCE
@ 2024-09-07  2:39 Brian Cain
  2024-09-16 12:45 ` Brian Cain
  0 siblings, 1 reply; 9+ messages in thread
From: Brian Cain @ 2024-09-07  2:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: alex.bennee, Brian Cain

With newer clang builds (19.x), there's a warning for implicit function
declarations and it rejects linux-test.c.

glibc/musl's readdir64() declaration in dirent is guarded by
_LARGEFILE64_SOURCE, so we'll define it to fix the warning.

      BUILD   hexagon-linux-user guest-tests
    /local/mnt/workspace/upstream/toolchain_for_hexagon/qemu/tests/tcg/multiarch/linux/linux-test.c:189:14: error: call to undeclared function 'readdir64'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      189 |         de = readdir64(dir);
          |              ^

Signed-off-by: Brian Cain <bcain@quicinc.com>
---
 tests/tcg/multiarch/linux/linux-test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/tcg/multiarch/linux/linux-test.c b/tests/tcg/multiarch/linux/linux-test.c
index 64f57cb287..4e0e862ad9 100644
--- a/tests/tcg/multiarch/linux/linux-test.c
+++ b/tests/tcg/multiarch/linux/linux-test.c
@@ -17,6 +17,7 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #define _GNU_SOURCE
+#define _LARGEFILE64_SOURCE
 #include <stdarg.h>
 #include <stdlib.h>
 #include <stdio.h>
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-09-19 13:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-07  2:39 [PATCH] tests/tcg/multiarch: Define _LARGEFILE64_SOURCE Brian Cain
2024-09-16 12:45 ` Brian Cain
2024-09-16 13:08   ` Alex Bennée
2024-09-16 13:12   ` Alex Bennée
2024-09-16 14:23     ` Brian Cain
2024-09-16 15:47       ` Alex Bennée
2024-09-16 16:05         ` Brian Cain
2024-09-16 16:31           ` Brian Cain
2024-09-19 13:48             ` Brian Cain

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.