Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inclusion of sysmacros.h by types.h is deprecated. (#2907)
Inclusion of sysmacros.h by types.h is deprecated. Release notes for glibc-2.25 state: The inclusion of <sys/sysmacros.h> by <sys/types.h> is deprecated. This means that in a future release, the macros “major”, “minor”, and “makedev” will only be available from <sys/sysmacros.h>. These macros are not part of POSIX nor XSI, and their names frequently collide with user code; see for instance glibc bug 19239 and Red Hat bug 130601. <stdlib.h> includes <sys/types.h> under _GNU_SOURCE, and C++ code presently cannot avoid being compiled under _GNU_SOURCE, exacerbating the problem. evalfunction.c: In function ‘FnCallFileStatDetails’: evalfunction.c:3191:64: error: implicit declaration of function ‘minor’; did you mean ‘mknod’? [-Werror=implicit-function-declaration] snprintf(buffer, CF_MAXVARSIZE, "%jd", (uintmax_t) minor(statbuf.st_dev) ); ^~~~~ mknod evalfunction.c:3199:64: error: implicit declaration of function ‘major’ [-Werror=implicit-function-declaration] snprintf(buffer, CF_MAXVARSIZE, "%jd", (uintmax_t) major(statbuf.st_dev) ); (cherry picked from commit f7d5832)
- Loading branch information