Author: rinrab
Date: Sun Aug 4 09:55:32 2024
New Revision: 1919659
URL: http://svn.apache.org/viewvc?rev=1919659&view=rev
Log:
Add check for uname having before retrieving it in the linux_release_name
function.
We have a wrapper over uname(); release_name_from_uname. This function would
be exist only if the HAVE_UNAME definition is true. However, the
linux_release_name function exists on every Linux system. So, this function
should work without uname. To support it, add a check for HAVE_UNAME inside
the linux_release_name function and request uname only if so.
* subversion/libsvn_subr/sysinfo.c
(linux_release_name): Retrieve uname only when we have it.
Modified:
subversion/trunk/subversion/libsvn_subr/sysinfo.c
Modified: subversion/trunk/subversion/libsvn_subr/sysinfo.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sysinfo.c?rev=1919659&r1=1919658&r2=1919659&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sysinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sysinfo.c Sun Aug 4 09:55:32 2024
@@ -646,7 +646,11 @@ debian_release(apr_pool_t *pool)
static const char *
linux_release_name(apr_pool_t *pool)
{
- const char *uname_release = release_name_from_uname(pool);
+ const char *uname_release = NULL;
+
+#if HAVE_UNAME
+ uname_release = release_name_from_uname(pool);
+#endif
/* Try anything that has /usr/bin/lsb_release.
Covers, for example, Debian, Ubuntu and SuSE. */