[EXTERNAL] [PATCH] Cygwin: fix MALLOC_ALIGNMENT already defined in newlib for AArch64

Radek Barton radek.barton@microsoft.com
Wed Jun 18 12:15:50 GMT 2025


Hello

Sending second version with Signed-off-by header.

Radek

---
>From e479be6a67118e70898145d478d0e0b88565f0d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Radek=20Barto=C5=88?= <radek.barton@microsoft.com>
Date: Thu, 5 Jun 2025 13:16:20 +0200
Subject: [PATCH v2] Cygwin: fix MALLOC_ALIGNMENT already defined in
 newlib for AArch64
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Radek Bartoň <radek.barton@microsoft.com>
---
 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.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-Cygwin-fix-MALLOC_ALIGNMENT-already-defined-in-newlib-for-AArch64.patch
Type: application/octet-stream
Size: 1053 bytes
Desc: v2-0001-Cygwin-fix-MALLOC_ALIGNMENT-already-defined-in-newlib-for-AArch64.patch
URL: <https://cygwin.com/pipermail/cygwin-patches/attachments/20250618/1ab762a3/attachment.obj>


More information about the Cygwin-patches mailing list