mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-08 13:50:20 +00:00
FreeBSD 11.4 __fflush returns 0 for a stream with no flags set, so a closed stream returns 0 without touching errno instead of the public fflush's -1 with EBADF. The test and the debt entry follow. Co-authored-by: Hedi Trigui <[email protected]>
13 lines
273 B
C++
13 lines
273 B
C++
#include "prx/libSceLibcInternal/include/Api.hpp"
|
|
#include "prx/libc/include/Api.hpp"
|
|
#include "SceTypes.hpp"
|
|
|
|
extern "C" {
|
|
|
|
int APS5_VABI __fflush_nid_postfix(FileStream* stream) {
|
|
if (stream && !stream->IsOpen()) return 0;
|
|
return fflush_nid_postfix(stream);
|
|
}
|
|
|
|
}
|