Skip to content

Commit 83cf314

Browse files
authored
Merge pull request #762 from axoflow/version/4.16.0
Version: 4.16.0
2 parents 7e21a57 + f7cad20 commit 83cf314

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

.github/workflows/macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
4949
HOMEBREW_PREFIX="$(brew --prefix)"
5050
PYTHONUSERBASE="${HOME}/python_packages"
51-
PKG_CONFIG_PATH="${HOMEBREW_PREFIX}/opt/mongo-c-driver@1/lib/pkgconfig:${HOMEBREW_PREFIX}/opt/openssl@3/lib/pkgconfig:${HOMEBREW_PREFIX}/opt/net-snmp/lib/pkgconfig:${HOMEBREW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
51+
PKG_CONFIG_PATH="${HOMEBREW_PREFIX}/opt/openssl@3/lib/pkgconfig:${HOMEBREW_PREFIX}/opt/net-snmp/lib/pkgconfig:${HOMEBREW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
5252
CFLAGS="-I${HOMEBREW_PREFIX}/include/"
5353
CXXFLAGS="-std=c++17"
5454

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Check out the [AxoSyslog documentation](https://axoflow.com/docs/axosyslog-core/
8181
8282
* The base of the AxoSyslog container image is updated to Alpine 3.22
8383
([#758](https://github.com/axoflow/axosyslog/pull/758))
84+
* `mongodb()`: support libmongoc v2
8485
8586
8687
[1] syslog-ng is a trademark of One Identity.

configure.ac

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,9 @@ dnl ***************************************************************************
14061406
dnl mongo-c-driver headers/libraries
14071407
dnl ***************************************************************************
14081408

1409-
PKG_CHECK_MODULES(LIBMONGO, libmongoc-1.0 >= $LMC_MIN_VERSION, with_mongoc="yes", with_mongoc="no")
1409+
PKG_CHECK_MODULES(LIBMONGO, mongoc2 >= $LMC_MIN_VERSION, with_mongoc="yes", [
1410+
PKG_CHECK_MODULES(LIBMONGO, libmongoc-1.0 >= $LMC_MIN_VERSION, with_mongoc="yes", with_mongoc="no")
1411+
])
14101412

14111413
if test "x$with_mongoc" = "xno" && test "x$enable_mongodb" = "xyes"; then
14121414
AC_MSG_ERROR([Could not find mongo-c-driver, and MongoDB support was explicitly enabled.])
@@ -1416,8 +1418,8 @@ if test "x$with_mongoc" = "xyes"; then
14161418
CPPFLAGS_SAVE="$CPPFLAGS"
14171419
CPPFLAGS="$CPPFLAGS $LIBMONGO_CFLAGS"
14181420

1419-
AC_CHECK_DECLS([mongoc_uri_set_option_as_int32], [], [], [[#include <mongoc.h>]])
1420-
AC_CHECK_DECLS([MONGOC_URI_SERVERSELECTIONTIMEOUTMS], [], [], [[#include <mongoc.h>]])
1421+
AC_CHECK_DECLS([mongoc_uri_set_option_as_int32], [], [], [[#include <mongoc/mongoc.h>]])
1422+
AC_CHECK_DECLS([MONGOC_URI_SERVERSELECTIONTIMEOUTMS], [], [], [[#include <mongoc/mongoc.h>]])
14211423

14221424
CPPFLAGS="$CPPFLAGS_SAVE"
14231425
fi

contrib/Brewfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ brew "libdbi"
1919
brew "libmaxminddb"
2020
brew "libnet"
2121
brew "librdkafka"
22-
brew "mongo-c-driver@1"
22+
brew "mongo-c-driver"
2323
brew "net-snmp"
2424
brew "python@3", link: true, force: true
2525
brew "rabbitmq-c"

modules/afmongodb/afmongodb-private.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
#define AFMONGODB_PRIVATE_H_
2525

2626
#include "syslog-ng.h"
27-
#include "mongoc.h"
2827
#include "logthrdest/logthrdestdrv.h"
2928
#include "template/templates.h"
3029
#include "value-pairs/value-pairs.h"
3130

31+
#include <mongoc/mongoc.h>
32+
3233
typedef struct _MongoDBDestDriver
3334
{
3435
LogThreadedDestDriver super;

modules/afmongodb/afmongodb-worker.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@
2626
#define AFMONGODB_WORKER_H_INCLUDED
2727

2828
#include "syslog-ng.h"
29-
#include "mongoc.h"
3029
#include "logthrdest/logthrdestdrv.h"
3130

31+
#include <mongoc/mongoc.h>
32+
3233
typedef struct MongoDBDestWorker
3334
{
3435
LogThreadedDestWorker super;

0 commit comments

Comments
 (0)