[PATCH] Patches to Samba 2.2.5 for Stratus VOS

Paul_GreenVOS at vos.stratus.com Paul_GreenVOS at vos.stratus.com
Mon Aug 26 06:21:00 GMT 2002


I read that you are planning a 2.2.6 release of Samba.  Would it
be possible for you to apply the following short patches to
samba/source/profile/profile.c and samba/source/utils/status.c
in the 2.2 branch ??

These are precisely the same patches that you just applied at my
request in Samba 3.0-alpha19.  They enable Samba to build on VOS
when --with-profile is not used, by avoiding references to
System V-style shared memory functions.  The other issues that I
ran into while building 3.0 are already resolved in the 2.2
branch.

I have tested building Samba with these patches on both VOS and
Solaris; no issues.  The patches are after my sig.

Oh, and I am making excellent progress getting rsync ported to
VOS.  A few more days, and I think I'll have it up and running.
Then I will try to get us into the build farm.

Thanks very much
PG
--
Paul Green                  | Mail: Paul.Green at stratus.com
Senior Technical Consultant | Voice: +1 978-461-7557   FAX: +1 978-461-3610
Stratus Technologies        | Video: PictureTel/AT&T by request.
Maynard, MA  01754          | Disclaimer: I speak for myself, not Stratus.

### START OF PATCHES ###

diff -urp --new-file oldsamba/source/profile/profile.c newsamba/source/profile/profile.c
--- oldsamba/source/profile/profile.c	Mon Aug 26 11:01:03 2002
+++ newsamba/source/profile/profile.c	Mon Aug 26 11:01:13 2002
@@ -22,7 +22,9 @@
 
 #include "includes.h"
 
+#ifdef WITH_PROFILE
 #define IPC_PERMS ((SHM_R | SHM_W) | (SHM_R>>3) | (SHM_R>>6))
+#endif /* WITH_PROFILE */
 
 static int shm_id;
 static BOOL read_only;
@@ -46,6 +48,7 @@ void profile_message(int msg_type, pid_t
         int level;
 
 	memcpy(&level, buf, sizeof(int));
+#ifdef WITH_PROFILE
 	switch (level) {
 	case 0:		/* turn off profiling */
 		do_profile_flag = False;
@@ -67,6 +70,9 @@ void profile_message(int msg_type, pid_t
 		DEBUG(1,("INFO: Profiling values cleared from pid %d\n", (int)src));
 		break;
 	}
+#else /* ndef WITH_PROFILE */
+	DEBUG(1,("INFO: Profiling support unavailable in this build.\n"));
+#endif /* WITH_PROFILE */
 }
 
 /****************************************************************************
@@ -88,6 +94,7 @@ void reqprofile_message(int msg_type, pi
 /*******************************************************************
   open the profiling shared memory area
   ******************************************************************/
+#ifdef WITH_PROFILE
 BOOL profile_setup(BOOL rdonly)
 {
 	struct shmid_ds shm_ds;
@@ -157,4 +164,4 @@ BOOL profile_setup(BOOL rdonly)
 	message_register(MSG_REQ_PROFILELEVEL, reqprofile_message);
 	return True;
 }
-
+#endif /* WITH_PROFILE */
diff -urp --new-file oldsamba/source/utils/status.c newsamba/source/utils/status.c
--- oldsamba/source/utils/status.c	Mon Aug 26 11:01:38 2002
+++ newsamba/source/utils/status.c	Mon Aug 26 11:01:31 2002
@@ -165,6 +165,7 @@ static void print_brl(SMB_DEV_T dev, SMB
   ******************************************************************/
 static int profile_dump(void)
 {
+#ifdef WITH_PROFILE
 	if (!profile_setup(True)) {
 		fprintf(stderr,"Failed to initialise profile memory\n");
 		return -1;
@@ -501,6 +502,9 @@ static int profile_dump(void)
 	printf("run_elections_time:             %u\n", profile_p->run_elections_time);
 	printf("election_count:                 %u\n", profile_p->election_count);
 	printf("election_time:                  %u\n", profile_p->election_time);
+#else /* ndef WITH_PROFILE */
+	fprintf(stderr,"Profile data unavailable\n");
+#endif /* WITH_PROFILE */
 
 	return 0;
 }

### END OF PATCHES ###




More information about the samba-technical mailing list