mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-06 03:28:11 +02:00
sysdeps: Don't check for PROC_SUPER_MAGIC if it isn't defined
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 5d7b87496f)
This commit is contained in:
parent
fd25d0da1a
commit
08d854af69
1 changed files with 2 additions and 2 deletions
|
|
@ -66,7 +66,7 @@ _dbus_file_get_contents (DBusString *str,
|
|||
{
|
||||
int fd;
|
||||
struct stat sb;
|
||||
#ifdef HAVE_FSTATFS
|
||||
#if defined(HAVE_FSTATFS) && defined(PROC_SUPER_MAGIC)
|
||||
struct statfs sfs;
|
||||
#endif
|
||||
int orig_len;
|
||||
|
|
@ -119,7 +119,7 @@ _dbus_file_get_contents (DBusString *str,
|
|||
/* 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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue