r3532 - in glibc-package/trunk/debian: . patches/kfreebsd
Author: aurel32
Date: 2009-05-24 15:04:19 +0000 (Sun, 24 May 2009)
New Revision: 3532
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff
Log:
* kfreebsd/local-sysdeps.diff: update to revision 2531 (from glibc-bsd).
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2009-05-24 14:10:37 UTC (rev 3531)
+++ glibc-package/trunk/debian/changelog 2009-05-24 15:04:19 UTC (rev 3532)
@@ -15,7 +15,7 @@
accordingly. Closes: #382175.
* debian/patches/any/submitted-tst-cpucount.diff: new patch to fix
tst-cpucount test on non Linux kernels.
- * kfreebsd/local-sysdeps.diff: update to revision 2530 (from glibc-bsd).
+ * kfreebsd/local-sysdeps.diff: update to revision 2531 (from glibc-bsd).
* debian/patches/kfreebsd/local-config_h_in.patch: new patch to correctly
define __KFREEBSD_KERNEL_VERSION.
* debian/sysdeps/kfreebsd.mk: bump minimal kernel version to 6.0.
Modified: glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff
===================================================================
--- glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff 2009-05-24 14:10:37 UTC (rev 3531)
+++ glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff 2009-05-24 15:04:19 UTC (rev 3532)
@@ -7869,7 +7869,7 @@
+}
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-sysdep.c
-@@ -0,0 +1,78 @@
+@@ -0,0 +1,50 @@
+/* Dynamic linker system dependencies for GNU/kFreeBSD.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
@@ -7895,7 +7895,7 @@
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
-+#include <sys/utsname.h>
++#include <sys/sysctl.h>
+#include <ldsodefs.h>
+#include <kernel-features.h>
+
@@ -7907,46 +7907,18 @@
+attribute_hidden
+_dl_discover_osversion (void)
+{
-+ char bufmem[64];
-+ char *buf = bufmem;
-+ unsigned int version;
-+ int parts;
-+ char *cp;
-+ struct utsname uts;
++ int request[2] = { CTL_KERN, KERN_OSRELDATE };
++ size_t len;
++ int version;
+
-+ /* Try the uname syscall */
-+ if (__uname (&uts))
++ len = sizeof(version);
++ if (__sysctl (request, 2, &version, &len, NULL, 0) < 0)
+ return -1;
+
-+ /* Now convert it into a number. The string consists of at most
-+ three parts. */
-+ version = 0;
-+ parts = 0;
-+ buf = uts.release;
-+ cp = buf;
-+ while ((*cp >= '0') && (*cp <= '9'))
-+ {
-+ unsigned int here = *cp++ - '0';
-+
-+ while ((*cp >= '0') && (*cp <= '9'))
-+ {
-+ here *= 10;
-+ here += *cp++ - '0';
-+ }
-+
-+ ++parts;
-+ version <<= 8;
-+ version |= here;
-+
-+ if (*cp++ != '.' || parts == 3)
-+ /* Another part following? */
-+ break;
-+ }
-+
-+ if (parts < 3)
-+ version <<= 8 * (3 - parts);
-+
-+ return version;
++ /* Convert to the GLIBC versioning system */
++ return ((version / 100000) << 16)
++ | (((version % 100000) / 1000) << 8)
++ | ((version % 1000) / 10);
+}
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-sysdep.h
Reply to: