summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-03-14 19:26:44 +1100
committerJeremy Allison <jra@samba.org>2013-03-15 10:37:53 -0700
commit29dfc94ca312523c5682235f642fb49030abd995 (patch)
treeab4da48aa020ca33e086efdb671cda48069f2296
parentfa6992eae51fb1456f345b99926717254eae8de3 (diff)
downloadsamba-29dfc94ca312523c5682235f642fb49030abd995.tar.gz
samba-29dfc94ca312523c5682235f642fb49030abd995.tar.bz2
samba-29dfc94ca312523c5682235f642fb49030abd995.zip
ccan: Cast getpid() result to unsigned int for GNU/Solaris build
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--lib/ccan/failtest/failtest.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ccan/failtest/failtest.c b/lib/ccan/failtest/failtest.c
index 7915a9222d..cffe36c042 100644
--- a/lib/ccan/failtest/failtest.c
+++ b/lib/ccan/failtest/failtest.c
@@ -321,7 +321,7 @@ static void PRINTF_FMT(1, 2) trace(const char *fmt, ...)
fprintf(tracef, " ");
p = failpath_string();
- fprintf(tracef, "%i: %u: %s ", idx++, getpid(), p);
+ fprintf(tracef, "%i: %u: %s ", idx++, (unsigned int)getpid(), p);
va_start(ap, fmt);
vfprintf(tracef, fmt, ap);
va_end(ap);
@@ -686,8 +686,8 @@ static bool should_fail(struct failtest_call *call)
/* Don't timeout. */
signal(SIGUSR1, SIG_IGN);
- sprintf(str, "xterm -e gdb /proc/%d/exe %d &",
- getpid(), getpid());
+ sprintf(str, "xterm -e gdb /proc/%u/exe %u &",
+ (unsigned int)getpid(), (unsigned int)getpid());
if (system(str) == 0)
sleep(5);
} else {
@@ -774,7 +774,7 @@ static bool should_fail(struct failtest_call *call)
else
p = c->file;
trace("%u->%u (%u.%02u): %s (%s:%u)\n",
- getppid(), getpid(),
+ (unsigned int)getppid(), (unsigned int)getpid(),
(int)diff.tv_sec, (int)diff.tv_usec / 10000,
failpath, p, c->line);
free(failpath);