This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] Don't look for kernel version if not running on linux
- From: Ulf Hermann <ulf dot hermann at qt dot io>
- To: Mark Wielaard <mark at klomp dot org>
- Cc: <elfutils-devel at sourceware dot org>
- Date: Fri, 28 Apr 2017 10:47:53 +0200
- Subject: Re: [PATCH] Don't look for kernel version if not running on linux
- Authentication-results: sourceware.org; auth=none
- Authentication-results: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=qt.io;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qtcompany.onmicrosoft.com; s=selector1-qt-io; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=LDkostruC/3zwSUrAvFocOWkIqEL9fKX3GzC5gzJ4cQ=; b=jOfpRrFJq8csPGV6qUyaXPFuI/qCjfGi8kKWuSFpNRfmMV2raS1e9cHnF59HoAEQay40PO533gu2R0ZloJgueJ0OnjiUXeAnmOG0nD4gkPq454cdMnLJpddRodRaydMqrbrl6q3jNh/YJk0tij401PuvwpngskLZZDQ3Dd8KyZU=
- References: <email@example.com> <20170427180231.GB2061@stream>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 04/27/2017 08:02 PM, Mark Wielaard wrote:
> On Thu, Apr 20, 2017 at 04:08:48PM +0200, Ulf Hermann wrote:
>> We don't want to use it, even if it exists.
> I am not sure this is really the right place to patch.
> The value is retrieved through uname () which is POSIX and so should
> be available even on non-GNU/Linux systems. When kernel_release ()
> returns NULL the callers expect errno to be set so they can use it
> to return a failure code.
You can get uname() on Windows through gnulib, but at the cost at linking to additional windows DLLs. It calls gethostname and for that we need to link against ws2_32.dll. That's an unreasonable dependency for getting something we cannot use anyway. I suggest we just set errno to ENOTSUP then.