1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

Attempting to fix ntp's MOD_NANO problems.

svn path=/nixpkgs/branches/stdenv-updates/; revision=19021
This commit is contained in:
Lluís Batlle i Rossell 2009-12-17 22:09:28 +00:00
parent 06d295f51b
commit 72fe687cd0
2 changed files with 34 additions and 0 deletions

View file

@ -49,6 +49,9 @@ stdenv.mkDerivation ({
/* Make sure `nscd' et al. are linked against `libssp'. */
./stack-protector-link.patch
/* MOD_NANO definition, for ntp (taken from glibc upstream) */
./mod_nano.patch
];
configureFlags = [

View file

@ -0,0 +1,31 @@
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 */