2010-11-27 10:02:05 tcpdump build error on 2010R1-RC4
Stefan Pledl (GERMANY)
Message: 96257
toolchain 2010R1-RC4
linux-kernel/uclinux-dist 2010R1-RC4
error on building user/tcpdump due to missing 'fork()'
The attached patch solves the problem.
0001-fix-tcpdump-build-error.patch
QuoteReplyEditDelete
2010-11-27 17:24:10 Re: tcpdump build error on 2010R1-RC4
Mike Frysinger (UNITED STATES)
Message: 96262
that isnt quite right. ive fixed things up in svn via configure checks.
QuoteReplyEditDelete
2010-11-27 20:35:28 Re: tcpdump build error on 2010R1-RC4
Stefan Pledl (GERMANY)
Message: 96268
Hello Mike,
i have seen your patch in 2010R1 branch. But if i compile this code always the #else /* HAVE_FORK && HAVE_VFORK */ part is compiled.
Is this right?
What's the meaning of the vfork() in the #if part?
#if !defined(HAVE_FORK) && !defined(HAVE_VFORK)
static void
compress_savefile(const char *filename)
{
# ifdef HAVE_FORK
if (fork())
# else
if (vfork())
# endif
return;
/*
* Set to lowest priority so that this doesn't disturb the capture
*/
#ifdef NZERO
setpriority(PRIO_PROCESS, 0, NZERO - 1);
#else
setpriority(PRIO_PROCESS, 0, 19);
#endif
if (execlp(zflag, zflag, filename, NULL) == -1)
fprintf(stderr,
"compress_savefile:execlp(%s, %s): %s\n",
zflag,
filename,
strerror(errno));
# ifdef HAVE_FORK
exit(1);
# else
_exit(1);
# endif
}
#else /* HAVE_FORK && HAVE_VFORK */
static void
compress_savefile(const char *filename)
{
fprintf(stderr,
"compress_savefile failed. Functionality not implemented under your system\n");
}
#endif /* HAVE_FORK && HAVE_VFORK */
QuoteReplyEditDelete
2010-11-27 20:51:16 Re: tcpdump build error on 2010R1-RC4
Mike Frysinger (UNITED STATES)
Message: 96269
ive fixed some inverted ifdef logic in svn
QuoteReplyEditDelete
2010-11-28 03:45:12 Re: tcpdump build error on 2010R1-RC4
Stefan Pledl (GERMANY)
Message: 96275
hello Mike,
in trunk you have done some modifications in libpcap, do we also need this in 2010R1 branch?
QuoteReplyEditDelete
2010-11-28 03:50:49 Re: tcpdump build error on 2010R1-RC4
Mike Frysinger (UNITED STATES)
Message: 96276
probably not
QuoteReplyEditDelete
2010-11-28 04:06:37 Re: tcpdump build error on 2010R1-RC4
Stefan Pledl (GERMANY)
Message: 96277
ok
thanks a lot for the quick response,
i will use your patches to make tcpdump running.