]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(DL_SYSDEP_OSCHECK): If GLRO(dl_osversion) has been already set to a value smaller...
authorUlrich Drepper <drepper@redhat.com>
Mon, 30 May 2005 20:22:25 +0000 (20:22 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 30 May 2005 20:22:25 +0000 (20:22 +0000)
sysdeps/unix/sysv/linux/dl-osinfo.h

index befa804cb1fa1f62214a3060b2d786193b41e2ff..03e1de716ca66456a7d79fee8eb330869621f551 100644 (file)
@@ -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)   \