ola: fix compilation with musl 1.2.3
musl 1.2.3 defines NULL as nullptr. Cannot use reinterpret_cast with nullptr.
No idea why this is even here. NULL in C == 0.
Similar to musl I could match is against the cplusplus version. But still. NULL is 0. I don't understand the point of the ifdef.
The musl commit that breaks ola compilation is http://git.musl-libc.org/cgit/musl/commit/?id=98e688a9da5e7b2925dda17a2d6820dddf1fb287
Made the change.
The longterm solution is to migrate this project to C++11. Newer protobuf requires it.
travis failures seem unrelated:
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
@peternewman, could you give this another look, please? Compilation failure against musl would also be a problem for Gentoo Linux (where we do have ola packaged as well). Thanks! I could investigate if I can add a github action that runs against musl ...
@kripton absolutely. There’s a setup-alpine GitHub actions workflow than can be used.
btw, why does this project support less than C++11?
Answered my own question:
C++ 11
------
As much as we'd like to start using C++11, Ubuntu 12.04 still comes with g++
4.6 which has partial support. Once 12.04 is end-of-lifed, we'll consider
using C++ 11 constructs.
12.04 is already EOL. Only 18.04 remains non EOL at LTS.