aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-05-30 20:22:25 +0000
committerUlrich Drepper <drepper@redhat.com>2005-05-30 20:22:25 +0000
commit609b254aa3a0488d45d9d828f9582d0e4c47a2dc (patch)
tree990e931c19f70f8f2fdc44ba8786ee1dea4a114e
parent8074c5c597240ed9edccb9ba69ed11fb73fbf134 (diff)
downloadglibc-609b254aa3a0488d45d9d828f9582d0e4c47a2dc.tar
glibc-609b254aa3a0488d45d9d828f9582d0e4c47a2dc.tar.gz
glibc-609b254aa3a0488d45d9d828f9582d0e4c47a2dc.tar.bz2
glibc-609b254aa3a0488d45d9d828f9582d0e4c47a2dc.zip
(DL_SYSDEP_OSCHECK): If GLRO(dl_osversion) has been already set to a value smaller than _dl_discover_osversion (), don't overwrite it here.
-rw-r--r--sysdeps/unix/sysv/linux/dl-osinfo.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h
index befa804cb1..03e1de716c 100644
--- a/sysdeps/unix/sysv/linux/dl-osinfo.h
+++ b/sysdeps/unix/sysv/linux/dl-osinfo.h
@@ -145,7 +145,9 @@ _dl_discover_osversion (void)
int version = _dl_discover_osversion (); \
if (__builtin_expect (version >= 0, 1)) \
{ \
- GLRO(dl_osversion) = version; \
+ if (__builtin_expect (GLRO(dl_osversion) == 0, 1) \
+ || GLRO(dl_osversion) > version) \
+ GLRO(dl_osversion) = version; \
\
/* Now we can test with the required version. */ \
if (__LINUX_KERNEL_VERSION > 0 && version < __LINUX_KERNEL_VERSION) \