summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-09-05 20:23:27 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-09-08 23:01:07 +0900
commite2ccb316b437104cd1734c378970d34f5305966d (patch)
treee6544bb77416690a8e79d9ca925aaa877bfa60a7 /file.c
parent55fef084dac843caf155f03077773704b36e139e (diff)
downloadruby-e2ccb316b437104cd1734c378970d34f5305966d.tar.gz
[Bug #5317] Use `rb_off_t` instead of `off_t`
Get rid of the conflict with system-provided small `off_t`.
Diffstat (limited to 'file.c')
-rw-r--r--file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/file.c b/file.c
index 514dec341a..eb5851de7d 100644
--- a/file.c
+++ b/file.c
@@ -2517,7 +2517,7 @@ rb_file_birthtime(VALUE obj)
*
*/
-off_t
+rb_off_t
rb_file_size(VALUE file)
{
if (RB_TYPE_P(file, T_FILE)) {
@@ -5089,7 +5089,7 @@ rb_file_s_join(VALUE klass, VALUE args)
#if defined(HAVE_TRUNCATE)
struct truncate_arg {
const char *path;
- off_t pos;
+ rb_off_t pos;
};
static void *
@@ -5138,7 +5138,7 @@ rb_file_s_truncate(VALUE klass, VALUE path, VALUE len)
#if defined(HAVE_FTRUNCATE)
struct ftruncate_arg {
int fd;
- off_t pos;
+ rb_off_t pos;
};
static VALUE
@@ -6093,7 +6093,7 @@ rb_stat_z(VALUE obj)
static VALUE
rb_stat_s(VALUE obj)
{
- off_t size = get_stat(obj)->st_size;
+ rb_off_t size = get_stat(obj)->st_size;
if (size == 0) return Qnil;
return OFFT2NUM(size);