Skip to content

Avoid redefining _FORTIFY_SOURCE

Tony Finch requested to merge fanf-avoid-fortify-source-redefinition into main

Some compilers have a built-in definition of the _FORTIFY_SOURCE macro that differs from BIND's preferred setting. This causes errors like the one quoted below. The solution is to undefine the macro before defining it. A similar fix was recently committed to glibc.

<command line>: error: '_FORTIFY_SOURCE' macro redefined
#define _FORTIFY_SOURCE 2
        ^
<built-in>: note: previous definition is here
#define _FORTIFY_SOURCE 0
    ^

https://sourceware.org/git/glibc.git/commitdiff/35bcb08eaa953c9b

Merge request reports