OpenBSD build error on CRN

FreeBSD build error on CRN. Reported by rasalgul on #radiant on QuakeNet:

Script started on Fri Aug 14 23:24:17 2026
localhost$ gmake


[  1%] Built target l_net
[  8%] Built target h2data
[ 15%] Built target q2map
[ 16%] Built target xmllib
[ 17%] Built target mapxml
[ 18%] Built target imagehl
[ 19%] Built target ddslib
[ 19%] Building CXX object libs/crnrgba/CMakeFiles/crnrgba.dir/crn_rgba.cpp.o
c++: warning: argument unused during compilation: '-L/usr/local/lib/babl-0.1' [-Wunused-command-line-argument]
c++: warning: argument unused during compilation: '-L/usr/local/lib' [-Wunused-command-line-argument]
c++: warning: argument unused during compilation: '-L/usr/X11R6/lib' [-Wunused-command-line-argument]
c++: warning: argument unused during compilation: '-L/usr/local/lib/python3.8' [-Wunused-command-line-argument]
In file included from /mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/crn_rgba.cpp:31:
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_decomp.h:483:8: warning: inline variables are a C++17 extension [-Wc++17-extensions]
static inline uint16_t swap16(uint16_t x) {
       ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_decomp.h:483:31: error: unexpected type name 'uint16_t': expected expression
static inline uint16_t swap16(uint16_t x) {
                              ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_decomp.h:483:31: error: unexpected type name 'uint16_t': expected expression
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_decomp.h:483:31: error: unexpected type name 'uint16_t': expected expression
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_decomp.h:483:31: error: unexpected type name 'uint16_t': expected expression
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_decomp.h:483:42: error: expected ';' after top level declarator
static inline uint16_t swap16(uint16_t x) {
                                         ^
                                         ;
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_decomp.h:1949:31: error: use of undeclared identifier 'malloc_usable_size'
      *pActual_size = p_new ? malloc_usable_size(p_new) : 0;
                              ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_decomp.h:1981:25: error: no member named 'malloc_usable_size' in the global namespace
      *pActual_size = ::malloc_usable_size(p_final_block);
                      ~~^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_decomp.h:1996:14: error: use of undeclared identifier 'malloc_usable_size'
  return p ? malloc_usable_size(p) : 0;
             ^
In file included from /mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/crn_rgba.cpp:31:
In file included from /mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_decomp.h:16:
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:234:56: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
        return (m_buf[0] << 16U) | (m_buf[1] << 8U) | (m_buf[2]);
                                                       ^     ~
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_decomp.h:2203:7: note: in instantiation of member function 'crnd::crn_packed_uint<2>::operator unsigned int' requested here
  if (file_header.m_sig != crn_header::cCRNSigValue)
      ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:240:3: note: array 'm_buf' declared here
  unsigned char m_buf[N];
  ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:236:57: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
        return (m_buf[0] << 24U) | (m_buf[1] << 16U) | (m_buf[2] << 8U) | (m_buf[3]);
                                                        ^     ~
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:240:3: note: array 'm_buf' declared here
  unsigned char m_buf[N];
  ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:236:76: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds]
        return (m_buf[0] << 24U) | (m_buf[1] << 16U) | (m_buf[2] << 8U) | (m_buf[3]);
                                                                           ^     ~
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:240:3: note: array 'm_buf' declared here
  unsigned char m_buf[N];
  ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:232:35: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
        return (m_buf[0] << 8U) | m_buf[1];
                                  ^     ~
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_decomp.h:2233:8: note: in instantiation of member function 'crnd::crn_packed_uint<1>::operator unsigned int' requested here
  if ((pHeader->m_faces != 1) && (pHeader->m_faces != 6))
       ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:240:3: note: array 'm_buf' declared here
  unsigned char m_buf[N];
  ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:234:37: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
        return (m_buf[0] << 16U) | (m_buf[1] << 8U) | (m_buf[2]);
                                    ^     ~
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:240:3: note: array 'm_buf' declared here
  unsigned char m_buf[N];
  ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:234:56: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
        return (m_buf[0] << 16U) | (m_buf[1] << 8U) | (m_buf[2]);
                                                       ^     ~
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:240:3: note: array 'm_buf' declared here
  unsigned char m_buf[N];
  ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:236:37: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
        return (m_buf[0] << 24U) | (m_buf[1] << 16U) | (m_buf[2] << 8U) | (m_buf[3]);
                                    ^     ~
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:240:3: note: array 'm_buf' declared here
  unsigned char m_buf[N];
  ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:236:57: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
        return (m_buf[0] << 24U) | (m_buf[1] << 16U) | (m_buf[2] << 8U) | (m_buf[3]);
                                                        ^     ~
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:240:3: note: array 'm_buf' declared here
  unsigned char m_buf[N];
  ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:236:76: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
        return (m_buf[0] << 24U) | (m_buf[1] << 16U) | (m_buf[2] << 8U) | (m_buf[3]);
                                                                           ^     ~
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:240:3: note: array 'm_buf' declared here
  unsigned char m_buf[N];
  ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:236:76: warning: array index 3 is past the end of the array (which contains 3 elements) [-Warray-bounds]
        return (m_buf[0] << 24U) | (m_buf[1] << 16U) | (m_buf[2] << 8U) | (m_buf[3]);
                                                                           ^     ~
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_decomp.h:2247:40: note: in instantiation of member function 'crnd::crn_packed_uint<3>::operator unsigned int' requested here
    pFile_info->m_total_palette_size = pHeader->m_color_endpoints.m_size + pHeader->m_color_selectors.m_size + pHeader->m_alpha_endpoints.m_size + pHeader->m_alpha_selectors.m_size;
                                       ^
/mnt/924G/DATA/CLIPS/maps/netradiant/libs/crnrgba/../crunch/crn_defs.h:240:3: note: array 'm_buf' declared here
  unsigned char m_buf[N];
  ^
11 warnings and 8 errors generated.
gmake[2]: *** [libs/crnrgba/CMakeFiles/crnrgba.dir/build.make:76: libs/crnrgba/CMakeFiles/crnrgba.dir/crn_rgba.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1254: libs/crnrgba/CMakeFiles/crnrgba.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
localhost$ exit



Script done on Fri Aug 14 23:24:24 2026