--- a/lib/Xm/Xmfuncs.h +++ b/lib/Xm/Xmfuncs.h @@ -41,6 +41,16 @@ #else #if (__STDC__ && !defined(X_NOT_STDC_ENV) && !defined(sun) && !defined(macII) && !defined(apollo)) || defined(SVR4) || defined(hpux) || defined(_IBMR2) || defined(_SEQUENT_) #include +/* HAMMERHEAD: pull in here, BEFORE bcopy/bzero/bcmp become + * function-like macros below. Otherwise X11/Xos.h's later (guarded, so + * normally a no-op) `#include ` is the FIRST time these + * prototypes are seen, and the macro substitution mangles the illumos + * `extern int bcmp(const void *, const void *, size_t);` declarations + * into invalid syntax ("expected declaration specifiers ... before '(' + * token"). Pre-including here means strings.h's own guard (_STRINGS_H) + * makes X11/Xos.h's later include a safe no-op. + */ +#include #define _XFUNCS_H_INCLUDED_STRING_H #define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len)) #define bzero(b,len) memset(b, 0, (size_t)(len))