mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 15:43:01 +00:00 
			
		
		
		
	use fileno()
Should use fileno() instead of direct
This commit is contained in:
		| @@ -167,7 +167,7 @@ JANET_CORE_FN(cfun_io_fopen, | |||||||
|     if (f != NULL) { |     if (f != NULL) { | ||||||
| #ifndef JANET_WINDOWS | #ifndef JANET_WINDOWS | ||||||
|         struct stat st; |         struct stat st; | ||||||
|         fstat(f->_fileno, &st); |         fstat(fileno(f), &st); | ||||||
|         if (S_ISDIR(st.st_mode)) { |         if (S_ISDIR(st.st_mode)) { | ||||||
|             fclose(f); |             fclose(f); | ||||||
|             janet_panicf("cannot open directory: %s", fname); |             janet_panicf("cannot open directory: %s", fname); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 peteee
					peteee