ucx/SOURCES/ucx-config.patch

36 lines
1.5 KiB
Diff

diff --git a/config/m4/sysdep.m4 b/config/m4/sysdep.m4
index b1e5485..0133803 100644
--- a/config/m4/sysdep.m4
+++ b/config/m4/sysdep.m4
@@ -158,7 +158,7 @@ AC_MSG_CHECKING([malloc hooks])
SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $CFLAGS_NO_DEPRECATED"
CHECK_CROSS_COMP([AC_LANG_SOURCE([#include <malloc.h>
- static int rc = 1;
+ static volatile int rc = 1;
void *ptr;
void *myhook(size_t size, const void *caller) {
rc = 0;
diff --git a/configure b/configure
index db54a6a..fa4352d 100755
--- a/configure
+++ b/configure
@@ -22221,7 +22221,7 @@ CFLAGS="$CFLAGS $CFLAGS_NO_DEPRECATED"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <malloc.h>
- static int rc = 1;
+ volatile static int rc = 1;
void *ptr;
void *myhook(size_t size, const void *caller) {
rc = 0;
@@ -22252,7 +22252,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <malloc.h>
- static int rc = 1;
+ volatile static int rc = 1;
void *ptr;
void *myhook(size_t size, const void *caller) {
rc = 0;