From fab96048ba53e01eff63d060f544bf97944ab8f8 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 21 Nov 2022 13:53:17 +0100 Subject: [PATCH] source3/wscript: Fix detection of major/minor macros These macros are only available via 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 Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett (cherry picked from commit d0ee9d5a43072ecbd37327f5dc936c546f97ba34) --- source3/wscript | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/wscript b/source3/wscript index 22be17a1a6f..ca27deaa543 100644 --- a/source3/wscript +++ b/source3/wscript @@ -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',