From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16764 invoked from network); 27 May 2020 15:57:56 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 27 May 2020 15:57:56 -0000 Received: (qmail 28297 invoked by uid 550); 27 May 2020 15:57:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 28269 invoked from network); 27 May 2020 15:57:49 -0000 Date: Wed, 27 May 2020 11:57:35 -0400 From: Rich Felker To: Alexander Scherbatiy Cc: musl@lists.openwall.com Message-ID: <20200527155735.GU1079@brightrain.aerifal.cx> References: <2059d75f-0428-d41e-444b-17365eef71bf@bell-sw.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2059d75f-0428-d41e-444b-17365eef71bf@bell-sw.com> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] musl libc version On Wed, May 27, 2020 at 06:44:38PM +0300, Alexander Scherbatiy wrote: > Hello, > > Using glibc it is possible to get GNU C library version using > confstr() function and _CS_GNU_LIBC_VERSION constant. > > In musl the confstr() returns EINVAL for _CS_GNU_LIBC_VERSION. > Is there a way to get libc version in musl? Can you describe what you're trying to achieve with a version number? musl specifically doesn't publish version numbers via macros or runtime interfaces because they're a poor proxy for checking for the particular feature/property/whatever you care about. For instance, distros may backport the thing you want to an older version, and even if not, you end up hard-coding knowledge about particular libcs that quickly bitrots rather than making something robust and future-proof. With that said, ability to test for some things is presently inadequate, and there's a proposal I've made (based on previous discussions with others) on libc-coord to improve this in a cross-libc manner: https://www.openwall.com/lists/libc-coord/2020/04/22/1 If you have input into what kinds of things you need to be able to test for it would be very helpful. Rich