Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICB: Fix compilation errors for ptrdiff_t #3488

wants to merge 1 commit into from


Copy link

@n-i-x n-i-x commented Nov 4, 2021

ICB: Fix compilation error for ptrdiff_t

../../../../engines/icb/common/ptr_util.cpp: In function ‘uint32 ICB::MemoryUtil::encodePtr(uint8*)’:
../../../../engines/icb/common/ptr_util.cpp:44:2: error: ‘ptrdiff_t’ was not declared in this scope
  ptrdiff_t diff = ptr - (uint8 *)0;
../../../../engines/icb/common/ptr_util.cpp:44:2: note: suggested alternative:
In file included from /usr/include/c++/5/new:39:0,
                 from ../../../../backends/platform/libretro/portdefs.h:32,
                 from ../../../../common/scummsys.h:44,
                 from ../../../../engines/icb/common/px_common.h:31,
                 from ../../../../engines/icb/common/ptr_util.cpp:28:
/usr/include/aarch64-linux-gnu/c++/5/bits/c++config.h:197:28: note:   ‘std::ptrdiff_t’
   typedef __PTRDIFF_TYPE__ ptrdiff_t;
../../../../engines/icb/common/ptr_util.cpp:45:24: error: ‘diff’ was not declared in this scope
  ptrRef.ref = (uint32)(diff & 0xFFFFFFFF);
Makefile:561: recipe for target 'engines/icb/common/ptr_util.o' failed
make: *** [engines/icb/common/ptr_util.o] Error 1
make: *** Waiting for unfinished jobs....
Copy link

@aquadran aquadran commented Nov 4, 2021

ptrdiff_t is part of "stddef.h". looks like you have some issue with your compiler. also std:: is not allowed. rejecting.


@aquadran aquadran closed this Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
2 participants