GCC defines __linux__, not __LINUX__

Fixes: 2c6512fe67a275ce4d251f3c5d304bc523597f42
This commit is contained in:
Alan Wu 2025-04-01 15:48:18 -04:00
parent 30e5e7c005
commit 6fbc32b5d0
Notes: git 2025-04-01 20:25:19 +00:00

4
file.c
View File

@ -4594,7 +4594,7 @@ rb_check_realpath_internal(VALUE basedir, VALUE path, rb_encoding *origenc, enum
free(resolved_ptr); free(resolved_ptr);
# endif # endif
# if !defined(__LINUX__) && !defined(__APPLE__) # if !defined(__linux__) && !defined(__APPLE__)
/* As `resolved` is a String in the filesystem encoding, no /* As `resolved` is a String in the filesystem encoding, no
* conversion is needed */ * conversion is needed */
struct stat st; struct stat st;
@ -4604,7 +4604,7 @@ rb_check_realpath_internal(VALUE basedir, VALUE path, rb_encoding *origenc, enum
} }
rb_sys_fail_path(unresolved_path); rb_sys_fail_path(unresolved_path);
} }
# endif /* !defined(__LINUX__) && !defined(__APPLE__) */ # endif /* !defined(__linux__) && !defined(__APPLE__) */
if (origenc && origenc != rb_enc_get(resolved)) { if (origenc && origenc != rb_enc_get(resolved)) {
if (!rb_enc_str_asciionly_p(resolved)) { if (!rb_enc_str_asciionly_p(resolved)) {