Compilation fails with undeclared 'NULL' in one of the source files. Reproducible: Always Steps to Reproduce: emerge sys-infiniband/dapl-2.0.36 Actual Results: /bin/sh ./libtool --tag=CC --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -Wall -D_GNU_SOURCE -DDAT_CONF="\"/etc/dat.conf\"" -D_GNU_SOURCE -DOS_RELEASE=196610 -DDAT_EXTENSIONS -DDEFINE_ATTR_LINK_LAYER -I./dat/include/ -I./dat/udat/ -I./dat/udat/linux -I./dat/common/ -O3 -pipe -march=native -c -o dat_udat_libdat2_la-dat_strerror.lo `test -f 'dat/common/dat_strerror.c' || echo './'`dat/common/dat_strerror.c x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -Wall -D_GNU_SOURCE -DDAT_CONF=\"/etc/dat.conf\" -D_GNU_SOURCE -DOS_RELEASE=196610 -DDAT_EXTENSIONS -DDEFINE_ATTR_LINK_LAYER -I./dat/include/ -I./dat/udat/ -I./dat/udat/linux -I./dat/common/ -O3 -pipe -march=native -c dat/common/dat_strerror.c -fPIC -DPIC -o .libs/dat_udat_libdat2_la-dat_strerror.o dat/common/dat_strerror.c: In function 'dat_strerror': dat/common/dat_strerror.c:714:30: error: 'NULL' undeclared (first use in this function) dat/common/dat_strerror.c:714:30: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [dat_udat_libdat2_la-dat_strerror.lo] Error 1 make[2]: Leaving directory `/var/tmp/portage/sys-infiniband/dapl-2.0.36/work/dapl-2.0.36' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/sys-infiniband/dapl-2.0.36/work/dapl-2.0.36' make: *** [all] Error 2
Created attachment 358354 [details, diff] fix missing header
Attached patch works for me on ~amd64. Should work elsewhere.