Skip to content

Commit

Permalink
CDRIVER-1314: Make sure the platforms has strings.h before including it
Browse files Browse the repository at this point in the history
  • Loading branch information
bjori committed Jun 7, 2016
1 parent 08fa430 commit 0c30be9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ else ()
endif ()
set (BSON_EXTRA_ALIGN 1)
CHECK_FUNCTION_EXISTS(syscall BSON_HAVE_SYSCALL_TID)
CHECK_INCLUDE_FILES(strings.h HAVE_STRINGS_H)
endif ()

set (BSON_HAVE_ATOMIC_32_ADD_AND_FETCH 1)
Expand Down
2 changes: 2 additions & 0 deletions build/autotools/CheckHeaders.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ if test "$ac_cv_header_stdbool_h" = "yes"; then
fi

AC_CREATE_STDINT_H([src/bson/bson-stdint.h])

AC_CHECK_HEADERS_ONCE([strings.h])
4 changes: 3 additions & 1 deletion src/bson/bson-iter.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#include "bson-iter.h"
#include "bson-config.h"
#include "bson-decimal128.h"
#include <strings.h>
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif


#define ITER_TYPE(i) ((bson_type_t) *((i)->raw + (i)->type))
Expand Down

0 comments on commit 0c30be9

Please sign in to comment.