diff options
author | Michael Eden <themichaeleden@gmail.com> | 2019-03-16 11:53:14 -0400 |
---|---|---|
committer | Michael Eden <themichaeleden@gmail.com> | 2019-03-25 15:16:43 -0400 |
commit | bce7e3b5853595b1306f76a54f7e201c51c7dbeb (patch) | |
tree | b595b95f3c571df9b348fcd35daba49919168e19 /pkgs/development/libraries/libmodbus | |
parent | 33e9fa2367c973d91bd729adce12634cc010dc8c (diff) |
libmodbus: fix for cross compilation
Diffstat (limited to 'pkgs/development/libraries/libmodbus')
-rw-r--r-- | pkgs/development/libraries/libmodbus/default.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libmodbus/default.nix b/pkgs/development/libraries/libmodbus/default.nix index 10bd7af7fadd4..d1ee30698a097 100644 --- a/pkgs/development/libraries/libmodbus/default.nix +++ b/pkgs/development/libraries/libmodbus/default.nix @@ -8,6 +8,16 @@ stdenv.mkDerivation rec { sha256 = "0drnil8bzd4n4qb0wv3ilm9zvypxvwmzd65w96d6kfm7x6q65j68"; }; + configureFlags = [ + # when cross-compiling we assume that the host system will return a valid + # pointer for calls to malloc(0) or realloc(0) + # https://www.uclibc.org/FAQ.html#gnu_malloc + # https://www.gnu.org/software/autoconf/manual/autoconf.html#index-AC_005fFUNC_005fMALLOC-454 + # the upstream source should be patched to avoid needing this + "ac_cv_func_malloc_0_nonnull=yes" + "ac_cv_func_realloc_0_nonnull=yes" + ]; + meta = with stdenv.lib; { description = "Library to send/receive data according to the Modbus protocol"; homepage = http://libmodbus.org/; |