So my goal is to use erlexec on embedded devices using Elixir's Nerves project for interactive shells (https://github.com/SteffenDE/nerves_ssh_shell) and on musl based systems it complains about limits.h missing:
===> Compiling /Users/steffen/Desktop/MonitorNews/nerves_containers/nerves_ssh_shell/examples/ssh_multi_daemon_example/deps/erlexec/c_src/ei++.cpp
===> In file included from c_src/ei++.hpp:50,
from c_src/ei++.cpp:5:
/Users/steffen/.nerves/artifacts/nerves_system_x86_64-portable-1.20.0/staging/usr/include/limits.h:124:26: error: no include path in which to search for limits.h
124 | # include_next <limits.h>
| ^
In file included from c_src/ei++.cpp:5:
c_src/ei++.hpp:76:28: error: 'INT_MAX' was not declared in this scope
76 | int size = INT_MAX);
| ^~~~~~~
c_src/ei++.hpp:57:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
56 | #include <sys/time.h>
+++ |+#include <climits>
57 | #include <unistd.h>
Including climits does NOT help, but replacing the occurrences of INT_MAX with std::numeric_limits<int>::max() works fine.
So my goal is to use
erlexec
on embedded devices using Elixir's Nerves project for interactive shells (https://github.com/SteffenDE/nerves_ssh_shell) and on musl based systems it complains aboutlimits.h
missing:Including
climits
does NOT help, but replacing the occurrences ofINT_MAX
withstd::numeric_limits<int>::max()
works fine.What do you think?