Gerald Carter
2002-May-09 07:18 UTC
[Samba] patch to configure.in for Solaris/gcc (-KPIC vs. -fPIC)
To Solaris admins.... Here's a patch for 2.2.4 for building on Solaris using GCC. You'll need to rerun autoconf after applying.... The second patch removes compiler warnings about redefinitions of ZERO_STRUCT. Now winbind should compile on solaris quietly. cheers, jerry --------------------------------------------------------------------- Hewlett-Packard http://www.hp.com SAMBA Team http://www.samba.org -- http://www.plainjoe.org "Sam's Teach Yourself Samba in 24 Hours" 2ed. ISBN 0-672-32269-2 --"I never saved anything for the swim back." Ethan Hawk in Gattaca-- -------------- next part -------------- Index: nsswitch/winbind_nss_config.h ==================================================================RCS file: /data/cvs/samba/source/nsswitch/winbind_nss_config.h,v retrieving revision 1.3.4.9 diff -u -r1.3.4.9 winbind_nss_config.h --- nsswitch/winbind_nss_config.h 2002/03/22 00:03:49 1.3.4.9 +++ nsswitch/winbind_nss_config.h 2002/05/09 14:15:53 @@ -129,11 +129,15 @@ #endif /* zero a structure */ +#ifndef ZERO_STRUCT #define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x)) +#endif /* zero a structure given a pointer to the structure */ +#ifndef ZERO_STRUCTP #define ZERO_STRUCTP(x) { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } - +#endif + /* Some systems (SCO) treat UNIX domain sockets as FIFOs */ #ifndef S_IFSOCK -------------- next part -------------- Index: configure.in ==================================================================RCS file: /data/cvs/samba/source/configure.in,v retrieving revision 1.130.4.136 diff -u -r1.130.4.136 configure.in --- configure.in 2002/05/09 13:26:54 1.130.4.136 +++ configure.in 2002/05/09 13:44:40 @@ -853,7 +853,7 @@ BLDSHARED="true" LDSHFLAGS="-G" SONAMEFLAG="-h " - if test "${ac_cv_prog_CC}" = "gcc"; then + if test "${GCC}" = "yes"; then PICFLAG="-fPIC" else PICFLAG="-KPIC" @@ -884,7 +884,7 @@ LDSHFLAGS="-set_version sgi1.0 -shared" SONAMEFLAG="-soname " SHLD="\${LD}" - if test "${ac_cv_prog_CC}" = "gcc"; then + if test "${GCC}" = "yes"; then PICFLAG="-fPIC" else PICFLAG="-KPIC"
Thamara Wanigatunga
2002-May-10 22:36 UTC
[Samba] patch to configure.in for Solaris/gcc (-KPIC vs. -fPIC)
Hello Gerald, Sometimes this may seem to you as a stupid question, but I'm helpless. I used patchadd and patch commands on Solaris to add these 2 patches you have given without any luck. I also reckon that these shouldn't be Solaris patches cos they don't have the basecode and the revision that Solaris patches should have.Pls tell me how to add them and tell me how Autoconf comes in to the picture. I'm installing this on a Solaris 2.6 on SPARC. Please give me a hint Thanks
Reasonably Related Threads
- Help with 2.2.4 binary build
- Problems building new 3.6.16: getting symbols from local sys AND "../lib/replace
- Compile problems with latest CVS
- Samba 2.2.4 make fails on Solaris 8 (Ultra Sparc III) using Sun F orte 6-update 2 compilers
- Samba 2.2.4 make fails on Solaris 8 (Ultra Sparc III) using Sun Forte 6-update 2 compilers