diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-09-05 20:23:27 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-09-08 23:01:07 +0900 |
commit | e2ccb316b437104cd1734c378970d34f5305966d (patch) | |
tree | e6544bb77416690a8e79d9ca925aaa877bfa60a7 /file.c | |
parent | 55fef084dac843caf155f03077773704b36e139e (diff) |
[Bug #5317] Use `rb_off_t` instead of `off_t`
Get rid of the conflict with system-provided small `off_t`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6329
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |