sandialabs / gr-sandia_utils

Misc blocks
GNU General Public License v3.0
13 stars 14 forks source link

fixes for osx build #15

Open jacobagilbert opened 1 year ago

jacobagilbert commented 1 year ago

This resolves two issues building on OSX:

  1. OSX uses <machine/endian.h> instead of <endian.h>, and while a conditional include could be done with preprocessor directives (or passing CFLAGS="$CFLAGS -I~/usr/include/machine conditionally in CMake), using <sys/types.h> (which is cross platform) seems easier.
  2. Stops relying on template argument deduction for std::min and std::max calls. Or maybe you would prefer to cast these to the same type... if so i can update to that behavior, let me know. Either way whats in here fails on OSX.