Re: [exim] converting from debian package to source

Etusivu
Poista viesti
Vastaa
Lähettäjä: Edwin Balani
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] converting from debian package to source
On Sat, Jan 08, 2022 at 05:02:10PM +0000, Jeremy Harris via Exim-users wrote:
>The dmarc library project appears to have changed their API
>in a incompatible fashion. It's difficult to tell, because
>there is no visible documentation and no obvious way to discover
>the library version at build time.
>
>At least, last time I looked.


Can't you rely on OPENDMARC_LIB_VERSION? It's defined in dmarc.h:

https://github.com/trusteddomainproject/OpenDMARC/blob/9cebf724/libopendmarc/dmarc.h#L19

Worth noting that 0 is a placeholder value is replaced for versioned
releases with the proper value (I think this is in the release
scripting), like so:

https://github.com/trusteddomainproject/OpenDMARC/blob/9cebf724/configure.ac#L72
https://github.com/trusteddomainproject/OpenDMARC/blob/9cebf724/Makefile.am#L32

Exim uses this too:

https://github.com/Exim/exim/blob/ef2e5890/src/src/dmarc.c#L56-L64

Something like #if ((OPENDMARC_LIB_VERSION & 0xFFFF0000u) >= 0x01040000)
would catch too-new library versions, I reckon.

~ Edwin