This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, libbacktrace]: Fix compilation on CentOS 5.8


On Tue, Sep 18, 2012 at 11:09 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> Hello!
>
> CentOS 5.8 uses glibc version 2.5 that needs _GNU_SOURCE defined to use strnlen.

Hm, shouldn't libiberty contain a xstrnlen?  I bet strnlen isn't available
everywhere.

Richard.

> 2012-09-18  Uros Bizjak  <ubizjak@gmail.com>
>
>         * dwarf.c: Define _GNU_SOURCE.
>
> Tested on CentOS x86_64-pc-linux-gnu. OK for mainline?
>
> Uros.
>
> Index: dwarf.c
> ===================================================================
> --- dwarf.c     (revision 191413)
> +++ dwarf.c     (working copy)
> @@ -30,6 +30,8 @@
>  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
>  POSSIBILITY OF SUCH DAMAGE.  */
>
> +#define _GNU_SOURCE
> +
>  #include "config.h"
>
>  #include <errno.h>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]