Subject: misc/21709: Cross compiling under Linux fails
To: None <gnats-bugs@gnats.netbsd.org>
From: None <john_94501@yahoo.com>
List: netbsd-bugs
Date: 05/29/2003 04:49:00
>Number:         21709
>Category:       misc
>Synopsis:       Cross compiling under Linux fails
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu May 29 04:50:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     John Gordon
>Release:        -current (5/27/03)
>Organization:
blueDonkey.org
>Environment:
Linux eeyore 2.4.19-16mdk #1 Fri Sep 20 18:15:05 CEST 2002 i686 unknown unknown GNU/Linux
>Description:
There are some minor problems with the cross compilation of NetBSD on my Mandrake Linux 9 box. 
>How-To-Repeat:
Build under Mandrake Linux 9.
>Fix:
The following patch fixes the build process for me:

Index: tools/compat/compat_defs.h
===================================================================
RCS file: /cvsroot/src/tools/compat/compat_defs.h,v
retrieving revision 1.26
diff -u -r1.26 compat_defs.h
--- tools/compat/compat_defs.h  2003/03/13 04:30:39     1.26
+++ tools/compat/compat_defs.h  2003/05/28 06:07:57
@@ -319,10 +319,20 @@
 #undef RCSID
 #define RCSID(x)

+/* Heimdal expects this one. */
+
+#undef __RCSID
+#define __RCSID(x)
+
 /* pwd_mkdb expects this one. */

 #undef __SCCSID
 #define __SCCSID(x)
+
+/* pwd_mkdb expects this one. */
+
+#undef __COPYRIGHT
+#define __COPYRIGHT(x)

 /* Some definitions not available on all systems. */

Index: tools/compat/db.h
===================================================================
RCS file: /cvsroot/src/tools/compat/db.h,v
retrieving revision 1.2
diff -u -r1.2 db.h
--- tools/compat/db.h   2002/01/29 10:20:32     1.2
+++ tools/compat/db.h   2003/05/28 06:07:57
@@ -1,5 +1,7 @@
 /*     $NetBSD: db.h,v 1.2 2002/01/29 10:20:32 tv Exp $        */

 #include "config.h"
+#ifndef __BIT_TYPES_DEFINED__
 #define __BIT_TYPES_DEFINED__
+#endif
 #include "../../include/db.h"
Index: usr.bin/db/db.c
===================================================================
RCS file: /cvsroot/src/usr.bin/db/db.c,v
retrieving revision 1.9
diff -u -r1.9 db.c
--- usr.bin/db/db.c     2003/05/20 08:34:52     1.9
+++ usr.bin/db/db.c     2003/05/28 06:08:04
@@ -38,7 +38,9 @@

 #include <sys/cdefs.h>
 #ifndef lint
+#ifdef __RCSID
 __RCSID("$NetBSD: db.c,v 1.9 2003/05/20 08:34:52 wiz Exp $");
+#endif
 #endif /* not lint */

 #include <db.h>

>Release-Note:
>Audit-Trail:
>Unformatted: