1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-12 21:58:10 +03:00

source3/wscript: Fix detection of major/minor macros

These macros are only available via <sys/sysmacros.h> as of glibc
commit e16deca62e16f645213dffd4ecd1153c37765f17 ("[BZ #19239] Don't
include sys/sysmacros.h from sys/types.h."), which went into
glibc 2.28.

This is different from the usual C99 cleanups because it changes
the configure check result with existing compilers that usually
accept implicit function declarations.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15281

Signed-off-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit d0ee9d5a43072ecbd37327f5dc936c546f97ba34)
This commit is contained in:
Florian Weimer 2022-11-21 13:53:17 +01:00 committed by Jule Anger
parent 409dd9b20e
commit fab96048ba

View File

@ -603,11 +603,11 @@ msg.msg_accrightslen = sizeof(fd);
conf.CHECK_HEADERS('asm/types.h')
conf.CHECK_CODE('dev_t dev; int i = major(dev); return 0', "HAVE_DEVICE_MAJOR_FN",
headers='unistd.h sys/types.h',
headers='sys/sysmacros.h unistd.h sys/types.h',
msg="Checking for major macro")
conf.CHECK_CODE('dev_t dev; int i = minor(dev); return 0', "HAVE_DEVICE_MINOR_FN",
headers='unistd.h sys/types.h',
headers='sys/sysmacros.h unistd.h sys/types.h',
msg="Checking for minor macro")
conf.CHECK_STRUCTURE_MEMBER('struct dirent', 'd_off',