From: misomosi Date: Tue, 7 May 2024 06:03:29 +0000 (-0400) Subject: Load a non-function X-Git-Url: http://git.misomosispi.com/?a=commitdiff_plain;h=82f995ac2da3502d2e82f409ae253f07641d35f9;p=pldh.git Load a non-function --- diff --git a/examples/stderr.c b/examples/stderr.c new file mode 100644 index 0000000..9af4a9b --- /dev/null +++ b/examples/stderr.c @@ -0,0 +1,9 @@ +#include "../pld.h" +#include +PLD("libc.so.6") +int main() +{ + PFN(o, stderr); + fprintf(*o, "Hello World!\n"); + return 0; +} diff --git a/pld.h b/pld.h index d0d1db9..a0eff06 100644 --- a/pld.h +++ b/pld.h @@ -47,6 +47,8 @@ static void PLD_Private_FormatError(void *code, char *s, int len, const char *na } #else // _WIN32 #include +#include +#include static void PLD_Private_WriteString(const char *s) { write(2, s, PLD_Private_strlen(s));