summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Schleifer <js@heap.zone>2019-05-06 00:22:29 +0200
committerJonathan Schleifer <js@heap.zone>2019-05-06 00:22:29 +0200
commit7e8cfd972b6726a217632494276e9596a6d2be14 (patch)
tree3cd5b357cb5e5e9a6f3469dda7153f3f3b96861b
parent7983f6c3a367c327dd12dc7faa6bb3d095624d5e (diff)
runtime/linklib: Fix compilation on MorphOS
-rw-r--r--src/runtime/linklib/linklib.m17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/runtime/linklib/linklib.m b/src/runtime/linklib/linklib.m
index 0b2b2749..bf791796 100644
--- a/src/runtime/linklib/linklib.m
+++ b/src/runtime/linklib/linklib.m
@@ -28,8 +28,10 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef OF_AMIGAOS_M68K
+#if defined(OF_AMIGAOS_M68K)
# include <stabs.h>
+#elif defined(OF_MORPHOS)
+# include <constructor.h>
#endif
#ifdef HAVE_SJLJ_EXCEPTIONS
@@ -120,8 +122,17 @@ dtor(void)
ADD2INIT(ctor, -2);
ADD2EXIT(dtor, -2);
#elif defined(OF_MORPHOS)
-CONSTRUCTOR_P(ctor, -2);
-DESTRUCTOR_P(dtor, -2);
+CONSTRUCTOR_P(ObjFWRT, 4000)
+{
+ ctor();
+
+ return 0;
+}
+
+DESTRUCTOR_P(ObjFWRT, 4000)
+{
+ dtor();
+}
#endif
void