pkgsrc-Users archive

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

Re: Fix for graphics/graphviz on FreeBSD

Rhialto writes:
> 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 */
> #endif
> or if I'm not so sure that the SOMETHING_ELSE always exists in the
> situation:
> #endif

From the best I've been able to see, the fix from FreeBSD is not documented. I made the assumption that SF_FLAGS defined and used in graphviz was in conflict with the one defined by FreeBSD. But I am not sure... Above all, it is difficult for me to understand why such a conflict might lead to a undeclared identifier.

When I inspected the header files included in sfclrlock.c, I found a #define SF_FLAGS. A clang -dM -E produced an output containing this definition.

Home | Main Index | Thread Index | Old Index