Skip to content

Commit

Permalink
Fix SysBase
Browse files Browse the repository at this point in the history
SysBase as a static is the correct way, otherwise an externally accessible symbol
will collide with any application-side SysBase symbol.
But in order to do that we need proto/exec.c to not declare the SysBase symbol
as extern. Do this by providing __NOLIBBASE__ before including the header.
  • Loading branch information
mheyer32 committed Oct 16, 2018
1 parent 79e2eaa commit 8a898f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion debug.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

#define __NOLIBBASE__
#include <exec/types.h>
#include <exec/execbase.h>
#include <proto/exec.h>

struct ExecBase* SysBase = NULL;
// define a static, local SysBase to not to interfere with the regular SysBase symbol
static struct ExecBase* SysBase = NULL;


/**** OS/C/ASM WRAPPERS ******************************************************/
Expand Down

0 comments on commit 8a898f8

Please sign in to comment.