$NetBSD: patch-ag,v 1.2 1999/03/05 11:22:34 frueauf Exp $ --- routines/sun/link_SYSV.c.orig Tue Oct 13 08:27:18 1998 +++ routines/sun/link_SYSV.c Sat Dec 19 23:54:03 1998 @@ -34,5 +34,5 @@ #endif -#ifdef linux +#if defined(linux) || defined(netbsd) || defined(freebsd) #include #include @@ -41,4 +41,5 @@ #ifndef linux #ifndef hppa +#if (!defined(netbsd) && !defined(freebsd)) #if (defined(sun) && ! defined(SYSV)) #else @@ -47,6 +48,7 @@ #endif #endif +#endif -#ifndef linux +#if !defined(linux) && !defined(netbsd) #ifdef __alpha #include @@ -59,7 +61,9 @@ #endif +#if !defined(netbsd) #if defined __alpha || defined sgi #include #endif +#endif #include @@ -264,8 +268,12 @@ "/usr/bin/ld", "-shared", "-o", 0, 0 #else +#if defined(netbsd) || defined(freebsd) + "/usr/bin/ld", "-Bshareable", "-o", 0, 0 +#else #ifdef hppa "/bin/ld", "-b", "-o", 0, 0 #else "/bin/ld", "-shared", "-o", 0, 0 +#endif #endif #endif