Skip to content

Commit 7648113

Browse files
committed
PHPC-2506: Detect BSON_HAVE_ALIGNED_ALLOC
1 parent 224a4ea commit 7648113

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

config.w32

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ if (PHP_MONGODB != "no") {
137137
BSON_HAVE_TIMESPEC: 0,
138138
BSON_EXTRA_ALIGN: 0,
139139
BSON_HAVE_GMTIME_R: 0,
140-
BSON_HAVE_RAND_R: 0
140+
BSON_HAVE_RAND_R: 0,
141+
BSON_HAVE_ALIGNED_ALLOC: 0
141142
};
142143

143144
mongodb_generate_header(

scripts/autotools/libbson/FindDependencies.m4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ AX_PTHREAD([
5252
],[
5353
AC_MSG_ERROR([libbson requires pthreads on non-Windows platforms.])
5454
])
55+
56+
# Check for aligned_alloc()
57+
AC_SUBST(BSON_HAVE_ALIGNED_ALLOC, 0)
58+
AC_CHECK_FUNC(aligned_alloc, [AC_SUBST(BSON_HAVE_ALIGNED_ALLOC, 1)])

0 commit comments

Comments
 (0)