Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler error on Android NDK r18 #163

Closed
theodelrieu opened this issue Nov 27, 2018 · 5 comments
Closed

Compiler error on Android NDK r18 #163

theodelrieu opened this issue Nov 27, 2018 · 5 comments

Comments

@theodelrieu
Copy link

Description

Hello,

I'm unable to build a test program with doctest using Android NDK r18:

doctest.h:4046:36: error: cannot initialize a member subobject of type 'int' with an rvalue of type 'nullptr_t'
            struct sigaction sa = {nullptr};
                                   ^~~~~~~

Steps to reproduce

  • Download the Android NDK r18.

  • Include doctest.h in a main.cpp and compile it with the shipped clang++ compiler

  • doctest version: v2.0.1

  • Operating System: Debian 9 unstable

  • Compiler+version: Clang 7.0

@theodelrieu
Copy link
Author

Here is a comment I found in the NDK's bits/signal_types.h:

/* For 64-bit (and mips), the kernel's struct sigaction doesn't match the
 * POSIX one, so we need to expose our own and translate behind the scenes.
 * For 32-bit, we're stuck with the definitions we already shipped,
 * even though they contain a sigset_t that's too small. See sigaction64.
 */

Note that the platform that fails is Android x86_64

@onqtam
Copy link
Member

onqtam commented Nov 27, 2018

Sooo there is a PR that fixes that - I guess it's time to merge it:

#162

EDIT: try the dev branch

onqtam added a commit that referenced this issue Nov 27, 2018
@theodelrieu
Copy link
Author

The fix works on my machine :)

Do you plan to release a 2.0.2 soon?

@onqtam
Copy link
Member

onqtam commented Nov 27, 2018

maybe in the following days but not today unfortunately - not sure when I'll get to it (its sort-of a lengthy process and I need my other machine for that...)

try using the dev branch for now and i'll do it when I can

@theodelrieu
Copy link
Author

Ok thanks, I'll close this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants