[newlib-cygwin/main] Cygwin: fix MALLOC_ALIGNMENT already defined in newlib for AArch64

Corinna Vinschen via Cygwin-cvs <[email protected]>
Newsgroups gmane.os.cygwin.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7de1ecc3e2ec46888e6f3306a05aaf28dd9884ca

commit 7de1ecc3e2ec46888e6f3306a05aaf28dd9884ca
Author:     Radek Bartoň <[email protected]>
AuthorDate: Thu Jun 5 13:16:20 2025 +0200
Commit:     Corinna Vinschen <[email protected]>
CommitDate: Wed Jun 18 16:11:04 2025 +0200

    Cygwin: fix MALLOC_ALIGNMENT already defined in newlib for AArch64
    
    Signed-off-by: Radek Bartoň <[email protected]>

Diff:
---
 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 5e1fe8154161..898ea56a567f 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 */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.