Hello.

The `MALLOC_ALIGNMENT` macro is already defined in 
`newlib/libc/include/sys/config.h` for AArch64.

Radek

---
>From ac23da59b18480c9a98be5ec41492182f24b0f45 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Radek=20Barto=C5=88?= <[email protected]>
Date: Thu, 5 Jun 2025 13:16:20 +0200
Subject: [PATCH] Cygwin: fix MALLOC_ALIGNMENT already defined in newlib for
 AArch64

---
 winsup/cygwin/local_includes/cygmalloc.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/winsup/cygwin/local_includes/cygmalloc.h 
b/winsup/cygwin/local_includes/cygmalloc.h
index 5e1fe8154..898ea56a5 100644
--- a/winsup/cygwin/local_includes/cygmalloc.h
+++ b/winsup/cygwin/local_includes/cygmalloc.h
@@ -21,7 +21,10 @@ int dlmalloc_trim (size_t);
 int dlmallopt (int p, int v);
 void dlmalloc_stats ();
 
+// Already defined for AArch64 in newlib/libc/include/sys/config.h
+#ifndef MALLOC_ALIGNMENT
 #define MALLOC_ALIGNMENT ((size_t)16U)
+#endif
 
 #if defined (DLMALLOC_VERSION) /* Building malloc.cc */
 
-- 
2.49.0.vfs.0.3

Attachment: 0001-Cygwin-fix-MALLOC_ALIGNMENT-already-defined-in-newlib.patch
Description: 0001-Cygwin-fix-MALLOC_ALIGNMENT-already-defined-in-newlib.patch

Reply via email to