]> Savannah Git Hosting - gnulib.git/commitdiff
aligned_alloc tests: Fix compilation error on mingw (regr. 2024-11-04).
authorBruno Haible <bruno@clisp.org>
Wed, 6 Nov 2024 04:23:51 +0000 (05:23 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 6 Nov 2024 04:23:51 +0000 (05:23 +0100)
* tests/test-aligned_alloc.c (aligned_alloc): Don't redefine if
aligned_alloc does not exist.

ChangeLog
tests/test-aligned_alloc.c

index 1a2acaaf680047381c039a8248e2188a2489add6..59a665308cb12f622522bce7f5ff35d7ee4c6a71 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-11-06  Bruno Haible  <bruno@clisp.org>
+
+       aligned_alloc tests: Fix compilation error on mingw (regr. 2024-11-04).
+       * tests/test-aligned_alloc.c (aligned_alloc): Don't redefine if
+       aligned_alloc does not exist.
+
 2024-11-06  Bruno Haible  <bruno@clisp.org>
 
        reallocarray: Fix compilation error in C++ mode (regr. 2024-11-04).
index 61ca73fe05d003d75e25359aea6e6f665a8908a6..89e236c9ea41d6f4db159ac96d4ba16a3c753ef1 100644 (file)
 
 #include "macros.h"
 
+#if HAVE_ALIGNED_ALLOC
 void *(*volatile my_aligned_alloc) (size_t, size_t) = aligned_alloc;
-#undef aligned_alloc
-#define aligned_alloc my_aligned_alloc
+# undef aligned_alloc
+# define aligned_alloc my_aligned_alloc
+#endif
 
 #define ROUNDUP(x,y) (((x) + (y) - 1) & - (y))