Index: /trunk/ccl/lib/macros.lisp
===================================================================
--- /trunk/ccl/lib/macros.lisp	(revision 6503)
+++ /trunk/ccl/lib/macros.lisp	(revision 6504)
@@ -2802,5 +2802,6 @@
                            ordinal
                            `(foreign-type-ordinal (load-time-value (%foreign-type-or-record ',record-name))))))
-      (setq result (nconc result `((%set-macptr-type ,name ,ordinal-form))))
+      (when (eq *host-backend* *target-backend*)
+        (setq result (nconc result `((%set-macptr-type ,name ,ordinal-form)))))
       (if (typep ftype 'foreign-record-type)
         (setq result
@@ -2855,5 +2856,6 @@
 	 (bzero (read-from-string "#_bzero")))    
     `(let* ((,p (,allocator ,bytes)))
-      (%set-macptr-type ,p ,ordinal-form)
+      ,@(when (eq *host-backend* *target-backend*)
+              `((%set-macptr-type ,p ,ordinal-form)))
       (,bzero ,p ,bytes)
       ,@(%foreign-record-field-forms p ftype record-name initforms)
