built_in.h: improved to define DEFFILEMODE if not provided by the libc109/head
commit4f650e60614f3e340b3baaff5a50e5cc55396d21
authorChristian Wiese <chris@opensde.org>
Thu, 10 Apr 2014 11:59:25 +0000 (10 13:59 +0200)
committerChristian Wiese <chris@opensde.org>
Thu, 10 Apr 2014 12:36:32 +0000 (10 14:36 +0200)
tree261244ea04c0a1841916f8d5d9e35cf94e116f20
parent70959ae3467fdf39fb4303adfebafcbd00e4f637
built_in.h: improved to define DEFFILEMODE if not provided by the libc

musl libc doesn't provide the non-standard macros for common mode bit masks,
which other libc implementations like glibc define in <sys/stat.h>.

Compile time error when building against musl libc
--------------------------------------------------------------------------
netsniff-ng.c: In function 'read_pcap':
netsniff-ng.c:592:33: error: 'DEFFILEMODE' undeclared (first use in this function)
--------------------------------------------------------------------------

This change improves built_in.h to check if DEFFILEMODE is defined and if not
it defines it to be available internally.
built_in.h