Skip to content

Commit

Permalink
[FIXED] Build: issue on Android with NATS_EXTRA_LIB (#739)
Browse files Browse the repository at this point in the history
* [FIXED] Build: issue on Android with NATS_EXTRA_LIB

A user (@psantiagol) reported an issue (in #64) building on Android
due to the use of `NATS_EXTRA_LIB`. This PR skip the definition of
this variable if building on Android. Should other users then report
that this is breaking their build on Android, we will have to make
this a conditional based on a boolean build option.

Signed-off-by: Ivan Kozlovic <[email protected]>

* Fix test JetStreamBackOffRedeliveries

With PR nats-io/nats-server#5242 in server
code, not providing a MaxDeliver is considered unlimited and should
not error out. So fixing test to set MaxDeliver <= to the backoff
list to get the expected error.

Signed-off-by: Ivan Kozlovic <[email protected]>

---------

Signed-off-by: Ivan Kozlovic <[email protected]>
  • Loading branch information
kozlovic authored and levb committed Apr 12, 2024
1 parent 2ab48fd commit f11e3e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ if(UNIX)
else(APPLE)
set(NATS_OS "LINUX")
set(NATS_USE_PTHREAD "-pthread")
set(NATS_EXTRA_LIB "rt -lpthread")
if(NOT ANDROID)
set(NATS_EXTRA_LIB "rt -lpthread")
endif()
endif(APPLE)
if (${NATS_BUILD_ARCH} MATCHES "32")
if(NOT APPLE)
Expand Down
1 change: 1 addition & 0 deletions test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -30205,6 +30205,7 @@ test_JetStreamBackOffRedeliveries(void)
so.Config.AckPolicy = js_AckExplicit;
so.Config.DeliverPolicy = js_DeliverAll;
so.Config.DeliverSubject = inbox;
so.Config.MaxDeliver = 2;
so.Config.BackOff = (int64_t[]){NATS_MILLIS_TO_NANOS(50), NATS_MILLIS_TO_NANOS(250)};
so.Config.BackOffLen = 2;
s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
Expand Down

0 comments on commit f11e3e5

Please sign in to comment.