#1307·cpr

Compiler error on android

Author: tpecholtCreated May 15, 2026Updated Jul 19, 2026
LabelsBug :bug:Build :construction_worker:

Description

I am trying to build cpr for android so it's possible I am doing something wrong but:

I am getting an error in openssl.c. Code looks like:

num = X509_get_serialNumber(x);
if(num->type == V_ASN1_NEG_INTEGER)
  BIO_puts(mem, "-");

it looks like asn1_string_st is not properly defined so one can't access it through num->type. Perhaps some wrapper function should be used instead to query the type?

It's also possible there is more to #include on android to make this work like crypto/asn1.h.

Example/How to Reproduce

  1. Create a cpr::Session
  2. Set option ...
  3. Perform the request
  4. See error

Possible Fix

No response

Where did you get it from?

GitHub (branch e.g. master)

Additional Context/Your Environment

  • OS: android
  • Version: ndk-r27d