diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-05-14 14:39:34 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-05-14 14:39:34 +0200 |
| commit | b818a29499b91faa2a222606802526073969e3c2 (patch) | |
| tree | 62b315ab2e5fd626851cdfe7407f13d09deb91f6 /src/wrapped32 | |
| parent | 69c88442b4db4a66eb1c50639ac826f6e9c5c945 (diff) | |
| download | box64-b818a29499b91faa2a222606802526073969e3c2.tar.gz box64-b818a29499b91faa2a222606802526073969e3c2.zip | |
[WRAPPER] Reduce the warning on of_unconvert helper function
Diffstat (limited to 'src/wrapped32')
| -rwxr-xr-x | src/wrapped32/wrappedlibc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wrapped32/wrappedlibc.c b/src/wrapped32/wrappedlibc.c index 6d9f473f..fb67dcda 100755 --- a/src/wrapped32/wrappedlibc.c +++ b/src/wrapped32/wrappedlibc.c @@ -633,7 +633,7 @@ int EXPORT my32_uname(struct utsname *buf) #define X86_O_NONBLOCK 0x800 // octal 04000 #define X86_O_SYNC 0x101000 // octal 04010000 #define X86_O_DSYNC 0x1000 // octal 010000 -#define X86_O_RSYNC O_SYNC +#define X86_O_RSYNC X86_O_SYNC #define X86_FASYNC 020000 #define X86_O_DIRECT 040000 #define X86_O_LARGEFILE 0100000 @@ -695,7 +695,10 @@ int of_unconvert32(int a) #define GO(A) if((a&A)==A) {a&=~A; b|=X86_##A;} SUPER(); #undef GO - if(a) { + int missing = 0; + if(!O_NOFOLLOW) missing |= X86_O_NOFOLLOW; + if(!O_LARGEFILE) missing |= X86_O_LARGEFILE; + if(a && (a&~missing)) { printf_log(LOG_NONE, "Warning, of_unconvert32(...) left over 0x%x, converted 0x%x\n", a, b); } return a|b; |