/* Look up the host address in the address list we just got. */
for (i = 0; hp->h_addr_list[i]; i++) {
- if (memcmp(hp->h_addr_list[i], (caddr_t) & addr, sizeof(addr)) == 0)
+ if (memcmp(hp->h_addr_list[i], (char *) & addr, sizeof(addr)) == 0)
return True;
}
#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;
int level;
memcpy(&level, buf, sizeof(int));
+#ifdef WITH_PROFILE
switch (level) {
case 0: /* turn off profiling */
do_profile_flag = False;
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 */
}
/****************************************************************************
/*******************************************************************
open the profiling shared memory area
******************************************************************/
+#ifdef WITH_PROFILE
BOOL profile_setup(BOOL rdonly)
{
struct shmid_ds shm_ds;
message_register(MSG_REQ_PROFILELEVEL, reqprofile_message);
return True;
}
+#endif /* WITH_PROFILE */
******************************************************************/
static int profile_dump(void)
{
+#ifdef WITH_PROFILE
if (!profile_setup(True)) {
fprintf(stderr,"Failed to initialise profile memory\n");
return -1;
d_printf("run_elections_time: %u\n", profile_p->run_elections_time);
d_printf("election_count: %u\n", profile_p->election_count);
d_printf("election_time: %u\n", profile_p->election_time);
+#else /* WITH_PROFILE */
+ fprintf(stderr, "Profile data unavailable\n");
+#endif /* WITH_PROFILE */
return 0;
}
{"conf", 's', POPT_ARG_STRING, 0, 's'},
{"user", 'u', POPT_ARG_STRING, 0, 'u'},
{"brief", 'b', POPT_ARG_NONE, &brief},
+#ifdef WITH_PROFILE
{"profile", 'P', POPT_ARG_NONE, &profile_only},
+#endif /* WITH_PROFILE */
{"byterange", 'B', POPT_ARG_NONE, &show_brl},
{ NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debug },
{ 0, 0, 0, 0}