mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-09 18:54:04 +02:00
Merge branch 'wip/pwithnall/bsd-copy-file-range' into 'main'
gfile: Ensure loff_t is defined on FreeBSD See merge request GNOME/glib!3431
This commit is contained in:
@@ -77,6 +77,13 @@
|
|||||||
#include "gioerror.h"
|
#include "gioerror.h"
|
||||||
#include "glibintl.h"
|
#include "glibintl.h"
|
||||||
|
|
||||||
|
/* Linux defines loff_t as a way to simplify the offset types for calls like
|
||||||
|
* splice() and copy_file_range(). BSD has copy_file_range() but doesn’t define
|
||||||
|
* loff_t. Abstract that. */
|
||||||
|
#ifndef HAVE_LOFF_T
|
||||||
|
typedef off_t loff_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gfile
|
* SECTION:gfile
|
||||||
|
@@ -828,6 +828,10 @@ if cc.has_header_symbol('dlfcn.h', 'RTLD_NEXT', args: '-D_GNU_SOURCE')
|
|||||||
glib_conf.set('HAVE_RTLD_NEXT', 1)
|
glib_conf.set('HAVE_RTLD_NEXT', 1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if cc.has_type('loff_t', prefix: '#include <sys/types.h>')
|
||||||
|
glib_conf.set('HAVE_LOFF_T', 1)
|
||||||
|
endif
|
||||||
|
|
||||||
# Check whether to use statfs or statvfs
|
# Check whether to use statfs or statvfs
|
||||||
# Some systems have both statfs and statvfs, pick the most "native" for these
|
# Some systems have both statfs and statvfs, pick the most "native" for these
|
||||||
if have_func_statfs and have_func_statvfs
|
if have_func_statfs and have_func_statvfs
|
||||||
|
Reference in New Issue
Block a user