NetBSD Problem Report #50653

From www@NetBSD.org  Wed Jan 13 07:39:23 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id AA3A07ABC0
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 13 Jan 2016 07:39:23 +0000 (UTC)
Message-Id: <20160113073922.C1B077ACCB@mollari.NetBSD.org>
Date: Wed, 13 Jan 2016 07:39:22 +0000 (UTC)
From: n54@gmx.com
Reply-To: n54@gmx.com
To: gnats-bugs@NetBSD.org
Subject: Error in the example section
X-Send-Pr-Version: www-1.0

>Number:         50653
>Category:       toolchain
>Synopsis:       Error in the example section
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 13 07:40:00 +0000 2016
>Originator:     Kamil Rytarowski
>Release:        7.99.25
>Organization:
>Environment:
NetBSD compaq 7.99.25 NetBSD 7.99.25 (GENERIC) #0: Fri Dec 25 20:05:36 CET 2015  root@chieftec:/tmp/netbsd-tmp/sys/arch/amd64/compile/GENERIC amd64
>Description:
elf_version (3) says:

EXAMPLES
     An application program would inform the ELF library about its desired
     operating version and check for an error using the following code
     snippet:

           if (elf_version(EV_CURRENT) == EV_NONE)
                   err(EXIT_FAILURE, "ELF library too old");

ERRORS
     Function elf_version() may fail with the following error:

     [ELF_E_VERSION]   An unsupported library version number was requested.


I think it should be:
           if (elf_version(EV_CURRENT) == EV_NONE)
                   errx(EXIT_FAILURE, "ELF library too old: %s", elf_errmsg(elf_errno())));
>How-To-Repeat:
N/A
>Fix:
N/A

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.