Ok, the first error was that I used uintptr as in /sys/include/libc.h, not uintptr_t as in /sys/include/ape/inttypes.h, that's the reason of the ansi/old mix definition error.
I saw that setrealloctag.c is implemented in 9front's /sys/src/ape/lib/9/ the same way as setmalloctag.c, an empty definition. I added it to my ape/lib/9/, the SUSV2 dance is taken from ape/lib/mp for consistency: mkfile: [...] setrealloctag.$O\ [...] libc.h: [...] #ifndef _SUSV2_SOURCE #define _SUSV2_SOURCE #include <inttypes.h> #undef _SUSV2_SOURCE #else #include <inttypes.h> #endif [...] extern void setrealloctag(void*, uintptr_t); [...] setrealloctag.c: #ifndef _SUSV2_SOURCE #define _SUSV2_SOURCE #include <inttypes.h> #undef _SUSV2_SOURCE #else #include <inttypes.h> #endif void setrealloctag(void*, uintptr_t) { } Maybe just use #include "libc.h" here? It compiles, and now after making similar changes my ape/port/sec compiles too. If someone is asking what is all of this about, is about importing 9front libsec to 9legacy. As I said before, the code is written on top of the contributions I've seen in the 9legacy patches in a very conservative way, after adding back aesCTR the impact is minimal. This was the last piece... I'll put in some place the patches I used from 9legacy and the steps to get a working base src from the 4th distribution, then my changes. I used almost all the patches listed as included in the 9legacy image so the common base is wider, even when some of them are of not use to me. The only patches I didn't use were one that didn't exist, the multiline tag acme patch (glitches) and two or three which couldn't be applied. Regards, adr. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Ta3a6ef4d223738a9-M325536ac295e33bbad90bc0d Delivery options: https://9fans.topicbox.com/groups/9fans/subscription