mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03:00
Fixes on the glibc-2.12 expression.
I removed a patch (mod_nano) already in the release. I fixed the nix-locale-archive so the programs don't try to modify the /usr locale-archive (for non-nixos), although the libc may use that archive to show strings. I remove the glibc-2.11 void directory. svn path=/nixpkgs/branches/stdenv-updates/; revision=23302
This commit is contained in:
parent
92e4866910
commit
9cbc109b9a
@ -66,10 +66,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
/* Allow nixos and nix handle the locale-archive. */
|
||||
./nix-locale-archive.patch
|
||||
]
|
||||
++ stdenv.lib.optional (fetchgit == null)
|
||||
/* MOD_NANO definition, for ntp (taken from glibc upstream) */
|
||||
./mod_nano.patch;
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
"-C"
|
||||
|
@ -1,31 +0,0 @@
|
||||
commit 89b432d7a5befb85048c97e881b2106e8df58e43
|
||||
Author: Ulrich Drepper <drepper@redhat.com>
|
||||
Date: Sun Nov 22 10:23:12 2009 -0800
|
||||
|
||||
Fix up <sys/timex.h> a bit more for recent API changes.
|
||||
|
||||
diff --git a/sysdeps/unix/sysv/linux/sys/timex.h b/sysdeps/unix/sysv/linux/sys/timex.h
|
||||
index 5f10c7f..88b87f1 100644
|
||||
--- a/sysdeps/unix/sysv/linux/sys/timex.h
|
||||
+++ b/sysdeps/unix/sysv/linux/sys/timex.h
|
||||
@@ -85,6 +85,9 @@ struct timex
|
||||
#define MOD_TIMECONST ADJ_TIMECONST
|
||||
#define MOD_CLKB ADJ_TICK
|
||||
#define MOD_CLKA ADJ_OFFSET_SINGLESHOT /* 0x8000 in original */
|
||||
+#define MOD_TAI ADJ_TAI
|
||||
+#define MOD_MICRO ADJ_MICRO
|
||||
+#define MOD_NANO ADJ_NANO
|
||||
|
||||
|
||||
/* Status codes (timex.status) */
|
||||
@@ -108,8 +111,9 @@ struct timex
|
||||
#define STA_MODE 0x4000 /* mode (0 = PLL, 1 = FLL) (ro) */
|
||||
#define STA_CLK 0x8000 /* clock source (0 = A, 1 = B) (ro) */
|
||||
|
||||
+/* Read-only bits */
|
||||
#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \
|
||||
- STA_PPSERROR | STA_CLOCKERR) /* read-only bits */
|
||||
+ STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
|
||||
|
||||
/* Clock states (time_state) */
|
||||
#define TIME_OK 0 /* clock synchronized, no leap second */
|
@ -50,7 +50,7 @@ diff --git a/locale/programs/locale.c b/locale/programs/locale.c
|
||||
index 77262b7..fddc00d 100644
|
||||
--- a/locale/programs/locale.c
|
||||
+++ b/locale/programs/locale.c
|
||||
@@ -628,6 +628,23 @@ nameentcmp (const void *a, const void *b)
|
||||
@@ -628,6 +628,20 @@ nameentcmp (const void *a, const void *b)
|
||||
((const struct nameent *) b)->name);
|
||||
}
|
||||
|
||||
@ -60,15 +60,12 @@ index 77262b7..fddc00d 100644
|
||||
+ int fd = -1;
|
||||
+ char *path = getenv ("LOCALE_ARCHIVE_2_11");
|
||||
+ char *path2 = getenv ("LOCALE_ARCHIVE");
|
||||
+ const char *usualpath = "/usr/lib/locale/locale-archive";
|
||||
+ if (path)
|
||||
+ fd = open64 (path, access);
|
||||
+ if (path2 && fd < 0)
|
||||
+ fd = open64 (path2, access);
|
||||
+ if (fd < 0)
|
||||
+ fd = open64 (fname, access);
|
||||
+ if (fd < 0)
|
||||
+ fd = open64 (usualpath, access);
|
||||
+ return fd;
|
||||
+}
|
||||
|
||||
@ -87,7 +84,7 @@ diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
|
||||
index 85ba77d..3ad2af8 100644
|
||||
--- a/locale/programs/locarchive.c
|
||||
+++ b/locale/programs/locarchive.c
|
||||
@@ -512,6 +512,23 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
|
||||
@@ -512,6 +512,20 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
|
||||
*ah = new_ah;
|
||||
}
|
||||
|
||||
@ -97,15 +94,12 @@ index 85ba77d..3ad2af8 100644
|
||||
+ int fd = -1;
|
||||
+ char *path = getenv ("LOCALE_ARCHIVE_2_11");
|
||||
+ char *path2 = getenv ("LOCALE_ARCHIVE");
|
||||
+ const char *usualpath = "/usr/lib/locale/locale-archive";
|
||||
+ if (path)
|
||||
+ fd = open64 (path, access);
|
||||
+ if (path2 && fd < 0)
|
||||
+ fd = open64 (path2, access);
|
||||
+ if (fd < 0)
|
||||
+ fd = open64 (fname, access);
|
||||
+ if (fd < 0)
|
||||
+ fd = open64 (usualpath, access);
|
||||
+ return fd;
|
||||
+}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user