mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix SIGSEGV while compiling dthelp on 64 bit systems.
Patch from Ulrich Wilkens <mail@uwilkens.de> I have a little patch for a problem that I found when I tried to compile dthelp on 64bit FreeBSD. It could also be a problem on other 64bit systems. The problem is that the program context compiles but fails running with segmentation fault. context uses the function m_malloc() which is missing a correct prototype sometimes. Then it's treated to return int instead of void * . On 64bit systems this cuts off the higher 32 bits because void * is 64bit whereas int is only 32bit.
This commit is contained in:
parent
e47bffb106
commit
f42fa885be
4 changed files with 24 additions and 0 deletions
|
@ -106,3 +106,9 @@ M_WCHAR *w_strstr(
|
|||
M_WCHAR *string1, M_WCHAR *string2
|
||||
#endif
|
||||
);
|
||||
|
||||
void *m_malloc(
|
||||
#if defined(M_PROTO)
|
||||
int size, char *msg
|
||||
#endif
|
||||
) ;
|
||||
|
|
|
@ -106,3 +106,9 @@ M_WCHAR *w_strstr(
|
|||
M_WCHAR *string1, M_WCHAR *string2
|
||||
#endif
|
||||
);
|
||||
|
||||
void *m_malloc(
|
||||
#if defined(M_PROTO)
|
||||
int size, char *msg
|
||||
#endif
|
||||
) ;
|
||||
|
|
|
@ -106,3 +106,9 @@ M_WCHAR *w_strstr(
|
|||
M_WCHAR *string1, M_WCHAR *string2
|
||||
#endif
|
||||
);
|
||||
|
||||
void *m_malloc(
|
||||
#if defined(M_PROTO)
|
||||
int size, char *msg
|
||||
#endif
|
||||
) ;
|
||||
|
|
|
@ -112,3 +112,9 @@ M_WCHAR *w_strstr(
|
|||
M_WCHAR *string1, M_WCHAR *string2
|
||||
#endif
|
||||
);
|
||||
|
||||
void *m_malloc(
|
||||
#if defined(M_PROTO)
|
||||
int size, char *msg
|
||||
#endif
|
||||
) ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue