HomeFreeBSD

devel/thrift-cpp: fix build on big-endian, unbreak on i386

Description

devel/thrift-cpp: fix build on big-endian, unbreak on i386

  1. Code for BE has issues:

In file included from /wrkdirs/usr/ports/devel/thrift-cpp/work/thrift-0.22.0/lib/cpp/src/thrift/TApplicationException.cpp:21:
/wrkdirs/usr/ports/devel/thrift-cpp/work/thrift-0.22.0/lib/cpp/src/thrift/protocol/TProtocol.h:669:66: error: expected ')'

669 |   static uint16_t toWire16(uint16_t x)   {return THRIFT_htoles(x);}
    |                                                                  ^

/wrkdirs/usr/ports/devel/thrift-cpp/work/thrift-0.22.0/lib/cpp/src/thrift/protocol/TProtocol.h:669:50: note: to match this '('

669 |   static uint16_t toWire16(uint16_t x)   {return THRIFT_htoles(x);}
    |                                                  ^

/wrkdirs/usr/ports/devel/thrift-cpp/work/thrift-0.22.0/lib/cpp/src/thrift/protocol/TProtocol.h:179:28: note: expanded from macro 'THRIFT_htoles'

179 | #  define THRIFT_htoles(n) bswap_16(n)
    |                            ^

/wrkdirs/usr/ports/devel/thrift-cpp/work/thrift-0.22.0/lib/cpp/src/thrift/protocol/TProtocol.h:173:9: note: expanded from macro 'bswap_16'

173 |       ( (((n) & (static_cast<unsigned short>(0xff00ul)) >> 8)  \
    |         ^
  1. Builds fine on i386.
  2. While here, remove MAKE_JOBS_UNSAFE=yes. I assume that if it builds on a POWER9 box with 176 threads, that's enough.

Details

Provenance
pkubajAuthored on Aug 24 2025, 10:22 AM
Parents
R11:6888bb4dc682: math/cgal: Add boost as a run-time dependency
Branches
Unknown
Tags
Unknown