Debian GNU/Hurd has fstatfs() but not PROC_SUPER_MAGIC.
Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/539
Bug-Debian: https://bugs.debian.org/
1089641
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit
5d7b87496f3bb094b926692036ae656c31efdd8e)
{
int fd;
struct stat sb;
-#ifdef HAVE_FSTATFS
+#if defined(HAVE_FSTATFS) && defined(PROC_SUPER_MAGIC)
struct statfs sfs;
#endif
int orig_len;
/* procfs has different semantics - most files are 0 size,
* we can do only one read, and at most we can read 4M.
*/
-#ifdef HAVE_FSTATFS
+#if defined(HAVE_FSTATFS) && defined(PROC_SUPER_MAGIC)
if (sb.st_size == 0)
{
if (fstatfs(fd, &sfs) < 0)