It is defined either directly in errno.h, or in a file included (directly or indirectly) with errno.h.
I searched for it using the following command:
find /usr/include | xargs grep ENOMEM | grep '#define'
and I found a match in /usr/include/asm-generic/errno-base.hin my Linux (RHEL 6).
source
share