pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fix for graphics/graphviz on FreeBSD



On Mon 26 Oct 2020 at 12:08:55 +0100, Frederic Fauberteau wrote:
> I was building graphics/graphviz on FreeBSD and encountered this error:
> sfclrlock.c:47:48: error: use of undeclared identifier 'SF_FLAGS'
>     rv = (f->mode & SF_PUSH) ? 0 : (f->flags & SF_FLAGS);
>                                                ^
> 
> By looking in the FreeBSD port tree, I seen the fix consisting in replacing SF_FLAGS by SFIO_FLAGS. I seen no comment about this fix and I assume that is because FreeBSD defines SF_FLAGS in /usr/include/sys/socket.h.

What I personally usually do, if a program uses some #define that
happens to be not defined, but there is another one that can replace it,
is adding something like this:

/* For FreeBSD which calls this differently */
#ifndef DEFINE_USED_BY_THE_PROGRAM
#define DEFINE_USED_BY_THE_PROGRAM SOMETHING_ELSE_THAT_SHOULD_EXIST
#endif

or if I'm not so sure that the SOMETHING_ELSE always exists in the
situation:

#if !defined(DEFINE_USED_BY_THE_PROGRAM) && defined(SOMETHING_ELSE_THAT_SHOULD_EXIST)
#define DEFINE_USED_BY_THE_PROGRAM SOMETHING_ELSE_THAT_SHOULD_EXIST
#endif

-Olaf.
-- 
Olaf 'Rhialto' Seibert -- rhialto at falu dot nl
___  Anyone who is capable of getting themselves made President should on
\X/  no account be allowed to do the job.       --Douglas Adams, "THGTTG"

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index