From 9b443b908fe6fb9c11f9b76552bf4fef2c3b2be5 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 24 Apr 2017 11:15:43 +0200 Subject: [PATCH] Replace _BSD_SOURCE with _DEFAULT_SOURCE Silence warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" http://man7.org/tlpi/code/faq.html#use_default_source Closes: https://pagure.io/freeipa/issue/6818 Signed-off-by: Christian Heimes Reviewed-By: Simo Sorce --- asn1/asn1c/Makefile.am | 1 + asn1/asn1c/asn_system.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/asn1/asn1c/Makefile.am b/asn1/asn1c/Makefile.am index 3829c5ebc..f11d0fac6 100644 --- a/asn1/asn1c/Makefile.am +++ b/asn1/asn1c/Makefile.am @@ -76,4 +76,5 @@ noinst_LTLIBRARIES=libasn1c.la regenerate: asn1c -fskeletons-copy -fnative-types ipa.asn1 + $(SED) -i s/_BSD_SOURCE/_DEFAULT_SOURCE/g asn_system.h rm -f converter-sample.c Makefile.am.sample diff --git a/asn1/asn1c/asn_system.h b/asn1/asn1c/asn_system.h index d19837edf..991177797 100644 --- a/asn1/asn1c/asn_system.h +++ b/asn1/asn1c/asn_system.h @@ -13,8 +13,8 @@ #include "config.h" #endif -#ifndef _BSD_SOURCE -#define _BSD_SOURCE /* for snprintf() on some linux systems */ +#ifndef _DEFAULT_SOURCE +#define _DEFAULT_SOURCE /* for snprintf() on some linux systems */ #endif #include /* For snprintf(3) */