[Libosinfo] [PATCH] Don't redefine _FORTIFY_SOURCE macro

Christophe Fergeau cfergeau at redhat.com
Tue Jan 22 19:01:20 UTC 2013


On Tue, Jan 22, 2013 at 07:53:13PM +0100, Michal Privoznik wrote:
> If the _FORTIFY_SOURCE has been already defined, we unconditionally
> redefine it, leaving us with warning/error thrown at compilation time.

Same change as what is done in libvirt, ACK.

Christophe

> ---
>  m4/libosinfo-compile-warnings.m4 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/m4/libosinfo-compile-warnings.m4 b/m4/libosinfo-compile-warnings.m4
> index 508ff80..fb58607 100644
> --- a/m4/libosinfo-compile-warnings.m4
> +++ b/m4/libosinfo-compile-warnings.m4
> @@ -89,7 +89,7 @@ AC_DEFUN([LIBOSINFO_COMPILE_WARNINGS],[
>      AH_VERBATIM([FORTIFY_SOURCE],
>      [/* Enable compile-time and run-time bounds-checking, and some warnings,
>          without upsetting newer glibc. */
> -     #if defined __OPTIMIZE__ && __OPTIMIZE__
> +     #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
>       # define _FORTIFY_SOURCE 2
>       #endif
>      ])
> -- 
> 1.8.0.2
> 
> _______________________________________________
> Libosinfo mailing list
> Libosinfo at redhat.com
> https://www.redhat.com/mailman/listinfo/libosinfo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libosinfo/attachments/20130122/c73f72b4/attachment.sig>


More information about the Libosinfo mailing list