Add checking for <sys/ucred.h>

A new header check is added for non-standard <sys/ucred.h>. Some platforms, like Linux, might support <sys/param.h>, <sys/mount.h>, and <fstab.h> but not this. Which can cause compilation to fail for gio/gunixmounts.c
This commit is contained in:
Felix Xing 2025-02-03 09:19:17 -05:00
parent a177c46b19
commit e99e27848e
2 changed files with 4 additions and 1 deletions

View File

@ -191,9 +191,11 @@ static GSource *proc_mounts_watch_source = NULL;
#if (defined(HAVE_GETVFSSTAT) || defined(HAVE_GETFSSTAT) || defined(HAVE_GETFSENT)) && defined(HAVE_FSTAB_H) && defined(HAVE_SYS_MOUNT_H)
#include <sys/param.h>
#include <sys/ucred.h>
#include <sys/mount.h>
#include <fstab.h>
#ifdef HAVE_SYS_UCRED_H
#include <sys/ucred.h>
#endif
#ifdef HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h>
#endif

View File

@ -435,6 +435,7 @@ headers = [
'sys/time.h', # MSC does not come with this by default
'sys/times.h',
'sys/types.h',
'sys/ucred.h',
'sys/uio.h',
'sys/vfs.h',
'sys/vfstab.h',