nats-io / nats.c

A C client for NATS
Apache License 2.0
382 stars 132 forks source link

[FIXED] Build: issue on Android with `NATS_EXTRA_LIB` #739

Closed kozlovic closed 4 months ago

kozlovic commented 4 months ago

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.

Also, fixed test JetStreamBackOffRedeliveries. With PR https://github.com/nats-io/nats-server/pull/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 ivan@synadia.com

levb commented 4 months ago

Cherry-picked for v3.8.1

Biswa96 commented 4 months ago

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.

IMO, this is the correct condition. termux-packages was carrying a patch for this issue for 2 years https://github.com/termux/termux-packages/blob/019cdbab029f468c8a370f78b8cdacc1b5dbd24e/packages/libnats-c/CMakeLists.txt.patch