diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2002-08-21 19:59:23 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2002-08-21 19:59:23 +0000 |
commit | d3aa76cef528a15571cade12ebdd10973f4ca579 (patch) | |
tree | bf5d26005dc4f8c88d58532c3aa1728c36edf01b /source3/profile | |
parent | 30e51241ecdda2724c441e372e6f99857719630f (diff) | |
download | samba-d3aa76cef528a15571cade12ebdd10973f4ca579.tar.gz samba-d3aa76cef528a15571cade12ebdd10973f4ca579.tar.bz2 samba-d3aa76cef528a15571cade12ebdd10973f4ca579.zip |
Patch from Paul Green <Paul.Green@stratus.com> to be more POSIX-compatible
(This used to be commit addf29e6765393b25c35bd833d29e29e4581c233)
Diffstat (limited to 'source3/profile')
-rw-r--r-- | source3/profile/profile.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/profile/profile.c b/source3/profile/profile.c index 595593c6f0..bbcfc780e8 100644 --- a/source3/profile/profile.c +++ b/source3/profile/profile.c @@ -21,7 +21,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; @@ -45,6 +47,7 @@ void profile_message(int msg_type, pid_t src, void *buf, size_t len) int level; memcpy(&level, buf, sizeof(int)); +#ifdef WITH_PROFILE switch (level) { case 0: /* turn off profiling */ do_profile_flag = False; @@ -66,6 +69,9 @@ void profile_message(int msg_type, pid_t src, void *buf, size_t len) DEBUG(1,("INFO: Profiling values cleared from pid %d\n", (int)src)); break; } +#else /* WITH_PROFILE */ + DEBUG(1,("INFO: Profiling support unavailable in this build.\n")); +#endif /* WITH_PROFILE */ } /**************************************************************************** @@ -87,6 +93,7 @@ void reqprofile_message(int msg_type, pid_t src, void *buf, size_t len) /******************************************************************* open the profiling shared memory area ******************************************************************/ +#ifdef WITH_PROFILE BOOL profile_setup(BOOL rdonly) { struct shmid_ds shm_ds; @@ -154,3 +161,4 @@ BOOL profile_setup(BOOL rdonly) message_register(MSG_REQ_PROFILELEVEL, reqprofile_message); return True; } +#endif /* WITH_PROFILE */ |