lib/xmalloc.c contains this function definition, unconditionally: static void * _GL_ATTRIBUTE_PURE nonnull (void *p) { if (!p) xalloc_die (); return p; }
But the declaration of xalloc_die in lib/xalloc.h is conditional: #if GNULIB_XALLOC_DIE /* This function is always triggered when memory is exhausted. It must be defined by the application, either explicitly or by using gnulib's xalloc-die module. This is the function to call when one wants the program to die because of a memory allocation failure. */ /*extern*/ _Noreturn void xalloc_die (void); #endif /* GNULIB_XALLOC_DIE */ I have a package (lbzip2 <https://github.com/kjn/lbzip2/>) which supplies its own definition of xalloc_die, and fails to build due to an undeclared function. So I'm wondering how this is supposed to work. Thanks, Florian