CJob
being a part of CFetchTask
turned out to be a problem as if I free the CFetchTask
the job result can no longer be written. If Destroy()
is called after the job is done the free works as expected, otherwise we are either leaking memory, or using after free.ddnet\src\engine\client\backend_sdl.cpp:561:41: error: 'putenv' was not declared in this scope
putenv("SDL_VIDEO_WINDOW_POS=center"); // ignore_convention
putenv
is not a standard C function_CRTIMP __cdecl __MINGW_NOTHROW char *getenv (const char *);
and not putenvint putenv(char *string);
above the function that uses it#if !defined (__STRICT_ANSI__)
int putenv(const char*);
undefined reference to `putenv(char const*)'int _putenv(const char *);
#define putenv _putenv
extern int putenv(const char *);
but also doesnt workextern
is the same as without for function prototypes#ifdef __MINGW32__
// Mingw doesn't define putenv() needed by Boost.Test
extern int putenv(char*);
#endif
const char *
. can you try char *
?extern "C"
{
int putenv(char *);
}
extern "C"
version? maybe with const
to get rid of the warning?extern "C"
{
int putenv(const char *);
}
#ifdef __MINGW32__
extern "C"
{
int putenv(const char *);
}
#endif
i guess this is how it shold be (edited)