summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/bits/errno.h1
-rw-r--r--arch/arm/bits/fcntl.h2
-rw-r--r--arch/arm/bits/mman.h7
-rw-r--r--arch/arm/bits/termios.h1
-rw-r--r--arch/i386/bits/errno.h1
-rw-r--r--arch/i386/bits/fcntl.h2
-rw-r--r--arch/i386/bits/mman.h7
-rw-r--r--arch/i386/bits/termios.h1
-rw-r--r--arch/microblaze/bits/errno.h1
-rw-r--r--arch/microblaze/bits/fcntl.h2
-rw-r--r--arch/microblaze/bits/mman.h7
-rw-r--r--arch/microblaze/bits/termios.h1
-rw-r--r--arch/mips/bits/fcntl.h2
-rw-r--r--arch/mips/bits/mman.h6
-rw-r--r--arch/powerpc/bits/errno.h1
-rw-r--r--arch/powerpc/bits/fcntl.h1
-rw-r--r--arch/powerpc/bits/mman.h7
-rw-r--r--arch/x86_64/bits/errno.h1
-rw-r--r--arch/x86_64/bits/fcntl.h2
-rw-r--r--arch/x86_64/bits/mman.h7
-rw-r--r--arch/x86_64/bits/termios.h1
-rw-r--r--include/netinet/in.h17
-rw-r--r--include/sys/epoll.h1
-rw-r--r--include/sys/inotify.h1
-rw-r--r--include/sys/mount.h26
-rw-r--r--include/sys/ptrace.h10
-rw-r--r--include/sys/reboot.h2
-rw-r--r--include/sys/signalfd.h5
-rw-r--r--include/sys/socket.h12
-rw-r--r--include/sys/swap.h1
-rw-r--r--include/sys/timex.h3
-rw-r--r--src/aio/lio_listio.c2
-rw-r--r--src/crypt/crypt_des.c19
-rw-r--r--src/crypt/crypt_md5.c2
-rw-r--r--src/crypt/crypt_sha256.c2
-rw-r--r--src/crypt/crypt_sha512.c2
-rw-r--r--src/ldso/dynlink.c18
-rw-r--r--src/regex/regexec.c3
38 files changed, 159 insertions, 28 deletions
diff --git a/arch/arm/bits/errno.h b/arch/arm/bits/errno.h
index c75720ef..d2e1eeee 100644
--- a/arch/arm/bits/errno.h
+++ b/arch/arm/bits/errno.h
@@ -131,3 +131,4 @@
#define EOWNERDEAD 130
#define ENOTRECOVERABLE 131
#define ERFKILL 132
+#define EHWPOISON 133
diff --git a/arch/arm/bits/fcntl.h b/arch/arm/bits/fcntl.h
index 9595f9ca..98e91d53 100644
--- a/arch/arm/bits/fcntl.h
+++ b/arch/arm/bits/fcntl.h
@@ -34,3 +34,5 @@
#define F_SETOWN_EX 15
#define F_GETOWN_EX 16
+
+#define F_GETOWNER_UIDS 17
diff --git a/arch/arm/bits/mman.h b/arch/arm/bits/mman.h
index 2f23d447..8c4110f1 100644
--- a/arch/arm/bits/mman.h
+++ b/arch/arm/bits/mman.h
@@ -20,6 +20,10 @@
#define MAP_DENYWRITE 0x0800
#define MAP_EXECUTABLE 0x1000
#define MAP_LOCKED 0x2000
+#define MAP_POPULATE 0x8000
+#define MAP_NONBLOCK 0x10000
+#define MAP_STACK 0x20000
+#define MAP_HUGETLB 0x40000
#define POSIX_MADV_NORMAL 0
#define POSIX_MADV_RANDOM 1
@@ -47,7 +51,10 @@
#define MADV_UNMERGEABLE 13
#define MADV_HUGEPAGE 14
#define MADV_NOHUGEPAGE 15
+#define MADV_DONTDUMP 16
+#define MADV_DODUMP 17
#define MADV_HWPOISON 100
+#define MADV_SOFT_OFFLINE 101
#define MREMAP_MAYMOVE 1
#define MREMAP_FIXED 2
diff --git a/arch/arm/bits/termios.h b/arch/arm/bits/termios.h
index 9f6abd83..61c888f4 100644
--- a/arch/arm/bits/termios.h
+++ b/arch/arm/bits/termios.h
@@ -144,6 +144,7 @@ struct termios
#define ECHOKE 0004000
#define FLUSHO 0010000
#define PENDIN 0040000
+#define EXTPROC 0200000
#define TCOOFF 0
#define TCOON 1
diff --git a/arch/i386/bits/errno.h b/arch/i386/bits/errno.h
index c75720ef..d2e1eeee 100644
--- a/arch/i386/bits/errno.h
+++ b/arch/i386/bits/errno.h
@@ -131,3 +131,4 @@
#define EOWNERDEAD 130
#define ENOTRECOVERABLE 131
#define ERFKILL 132
+#define EHWPOISON 133
diff --git a/arch/i386/bits/fcntl.h b/arch/i386/bits/fcntl.h
index 69f3a8f5..4cc0312d 100644
--- a/arch/i386/bits/fcntl.h
+++ b/arch/i386/bits/fcntl.h
@@ -34,3 +34,5 @@
#define F_SETOWN_EX 15
#define F_GETOWN_EX 16
+
+#define F_GETOWNER_UIDS 17
diff --git a/arch/i386/bits/mman.h b/arch/i386/bits/mman.h
index 4083c198..add63855 100644
--- a/arch/i386/bits/mman.h
+++ b/arch/i386/bits/mman.h
@@ -21,6 +21,10 @@
#define MAP_DENYWRITE 0x0800
#define MAP_EXECUTABLE 0x1000
#define MAP_LOCKED 0x2000
+#define MAP_POPULATE 0x8000
+#define MAP_NONBLOCK 0x10000
+#define MAP_STACK 0x20000
+#define MAP_HUGETLB 0x40000
#define POSIX_MADV_NORMAL 0
#define POSIX_MADV_RANDOM 1
@@ -48,7 +52,10 @@
#define MADV_UNMERGEABLE 13
#define MADV_HUGEPAGE 14
#define MADV_NOHUGEPAGE 15
+#define MADV_DONTDUMP 16
+#define MADV_DODUMP 17
#define MADV_HWPOISON 100
+#define MADV_SOFT_OFFLINE 101
#define MREMAP_MAYMOVE 1
#define MREMAP_FIXED 2
diff --git a/arch/i386/bits/termios.h b/arch/i386/bits/termios.h
index 9f6abd83..61c888f4 100644
--- a/arch/i386/bits/termios.h
+++ b/arch/i386/bits/termios.h
@@ -144,6 +144,7 @@ struct termios
#define ECHOKE 0004000
#define FLUSHO 0010000
#define PENDIN 0040000
+#define EXTPROC 0200000
#define TCOOFF 0
#define TCOON 1
diff --git a/arch/microblaze/bits/errno.h b/arch/microblaze/bits/errno.h
index c75720ef..d2e1eeee 100644
--- a/arch/microblaze/bits/errno.h
+++ b/arch/microblaze/bits/errno.h
@@ -131,3 +131,4 @@
#define EOWNERDEAD 130
#define ENOTRECOVERABLE 131
#define ERFKILL 132
+#define EHWPOISON 133
diff --git a/arch/microblaze/bits/fcntl.h b/arch/microblaze/bits/fcntl.h
index 69f3a8f5..4cc0312d 100644
--- a/arch/microblaze/bits/fcntl.h
+++ b/arch/microblaze/bits/fcntl.h
@@ -34,3 +34,5 @@
#define F_SETOWN_EX 15
#define F_GETOWN_EX 16
+
+#define F_GETOWNER_UIDS 17
diff --git a/arch/microblaze/bits/mman.h b/arch/microblaze/bits/mman.h
index 2f23d447..8c4110f1 100644
--- a/arch/microblaze/bits/mman.h
+++ b/arch/microblaze/bits/mman.h
@@ -20,6 +20,10 @@
#define MAP_DENYWRITE 0x0800
#define MAP_EXECUTABLE 0x1000
#define MAP_LOCKED 0x2000
+#define MAP_POPULATE 0x8000
+#define MAP_NONBLOCK 0x10000
+#define MAP_STACK 0x20000
+#define MAP_HUGETLB 0x40000
#define POSIX_MADV_NORMAL 0
#define POSIX_MADV_RANDOM 1
@@ -47,7 +51,10 @@
#define MADV_UNMERGEABLE 13
#define MADV_HUGEPAGE 14
#define MADV_NOHUGEPAGE 15
+#define MADV_DONTDUMP 16
+#define MADV_DODUMP 17
#define MADV_HWPOISON 100
+#define MADV_SOFT_OFFLINE 101
#define MREMAP_MAYMOVE 1
#define MREMAP_FIXED 2
diff --git a/arch/microblaze/bits/termios.h b/arch/microblaze/bits/termios.h
index 9f6abd83..61c888f4 100644
--- a/arch/microblaze/bits/termios.h
+++ b/arch/microblaze/bits/termios.h
@@ -144,6 +144,7 @@ struct termios
#define ECHOKE 0004000
#define FLUSHO 0010000
#define PENDIN 0040000
+#define EXTPROC 0200000
#define TCOOFF 0
#define TCOON 1
diff --git a/arch/mips/bits/fcntl.h b/arch/mips/bits/fcntl.h
index c681d237..c51ee7e7 100644
--- a/arch/mips/bits/fcntl.h
+++ b/arch/mips/bits/fcntl.h
@@ -34,3 +34,5 @@
#define F_SETOWN_EX 15
#define F_GETOWN_EX 16
+
+#define F_GETOWNER_UIDS 17
diff --git a/arch/mips/bits/mman.h b/arch/mips/bits/mman.h
index 3e6faa40..ac8dd5e5 100644
--- a/arch/mips/bits/mman.h
+++ b/arch/mips/bits/mman.h
@@ -20,6 +20,10 @@
#define MAP_DENYWRITE 0x2000
#define MAP_EXECUTABLE 0x4000
#define MAP_LOCKED 0x8000
+#define MAP_POPULATE 0x10000
+#define MAP_NONBLOCK 0x20000
+#define MAP_STACK 0x40000
+#define MAP_HUGETLB 0x80000
#define POSIX_MADV_NORMAL 0
#define POSIX_MADV_RANDOM 1
@@ -47,6 +51,8 @@
#define MADV_UNMERGEABLE 13
#define MADV_HUGEPAGE 14
#define MADV_NOHUGEPAGE 15
+#define MADV_DONTDUMP 16
+#define MADV_DODUMP 17
#define MADV_HWPOISON 100
#define MREMAP_MAYMOVE 1
diff --git a/arch/powerpc/bits/errno.h b/arch/powerpc/bits/errno.h
index 9a193a2d..36ad2f90 100644
--- a/arch/powerpc/bits/errno.h
+++ b/arch/powerpc/bits/errno.h
@@ -131,3 +131,4 @@
#define EOWNERDEAD 130
#define ENOTRECOVERABLE 131
#define ERFKILL 132
+#define EHWPOISON 133
diff --git a/arch/powerpc/bits/fcntl.h b/arch/powerpc/bits/fcntl.h
index 83c02226..b57bd57d 100644
--- a/arch/powerpc/bits/fcntl.h
+++ b/arch/powerpc/bits/fcntl.h
@@ -35,3 +35,4 @@
#define F_SETOWN_EX 15
#define F_GETOWN_EX 16
+#define F_GETOWNER_UIDS 17
diff --git a/arch/powerpc/bits/mman.h b/arch/powerpc/bits/mman.h
index 0c6cc321..15e3049e 100644
--- a/arch/powerpc/bits/mman.h
+++ b/arch/powerpc/bits/mman.h
@@ -20,6 +20,10 @@
#define MAP_DENYWRITE 0x0800
#define MAP_EXECUTABLE 0x1000
#define MAP_LOCKED 0x80
+#define MAP_POPULATE 0x8000
+#define MAP_NONBLOCK 0x10000
+#define MAP_STACK 0x20000
+#define MAP_HUGETLB 0x40000
#define POSIX_MADV_NORMAL 0
#define POSIX_MADV_RANDOM 1
@@ -47,7 +51,10 @@
#define MADV_UNMERGEABLE 13
#define MADV_HUGEPAGE 14
#define MADV_NOHUGEPAGE 15
+#define MADV_DONTDUMP 16
+#define MADV_DODUMP 17
#define MADV_HWPOISON 100
+#define MADV_SOFT_OFFLINE 101
#define MREMAP_MAYMOVE 1
#define MREMAP_FIXED 2
diff --git a/arch/x86_64/bits/errno.h b/arch/x86_64/bits/errno.h
index c75720ef..d2e1eeee 100644
--- a/arch/x86_64/bits/errno.h
+++ b/arch/x86_64/bits/errno.h
@@ -131,3 +131,4 @@
#define EOWNERDEAD 130
#define ENOTRECOVERABLE 131
#define ERFKILL 132
+#define EHWPOISON 133
diff --git a/arch/x86_64/bits/fcntl.h b/arch/x86_64/bits/fcntl.h
index 9e07229e..0949f31d 100644
--- a/arch/x86_64/bits/fcntl.h
+++ b/arch/x86_64/bits/fcntl.h
@@ -34,3 +34,5 @@
#define F_SETOWN_EX 15
#define F_GETOWN_EX 16
+
+#define F_GETOWNER_UIDS 17
diff --git a/arch/x86_64/bits/mman.h b/arch/x86_64/bits/mman.h
index c4cd8aef..dcab47a4 100644
--- a/arch/x86_64/bits/mman.h
+++ b/arch/x86_64/bits/mman.h
@@ -21,6 +21,10 @@
#define MAP_DENYWRITE 0x0800
#define MAP_EXECUTABLE 0x1000
#define MAP_LOCKED 0x2000
+#define MAP_POPULATE 0x8000
+#define MAP_NONBLOCK 0x10000
+#define MAP_STACK 0x20000
+#define MAP_HUGETLB 0x40000
#define POSIX_MADV_NORMAL 0
#define POSIX_MADV_RANDOM 1
@@ -48,7 +52,10 @@
#define MADV_UNMERGEABLE 13
#define MADV_HUGEPAGE 14
#define MADV_NOHUGEPAGE 15
+#define MADV_DONTDUMP 16
+#define MADV_DODUMP 17
#define MADV_HWPOISON 100
+#define MADV_SOFT_OFFLINE 101
#define MREMAP_MAYMOVE 1
#define MREMAP_FIXED 2
diff --git a/arch/x86_64/bits/termios.h b/arch/x86_64/bits/termios.h
index 9f6abd83..61c888f4 100644
--- a/arch/x86_64/bits/termios.h
+++ b/arch/x86_64/bits/termios.h
@@ -144,6 +144,7 @@ struct termios
#define ECHOKE 0004000
#define FLUSHO 0010000
#define PENDIN 0040000
+#define EXTPROC 0200000
#define TCOOFF 0
#define TCOON 1
diff --git a/include/netinet/in.h b/include/netinet/in.h
index 1086f074..fcab298b 100644
--- a/include/netinet/in.h
+++ b/include/netinet/in.h
@@ -5,6 +5,8 @@
extern "C" {
#endif
+#include <features.h>
+
#define __NEED_in_addr_t
#define __NEED_in_port_t
#define __NEED_sa_family_t
@@ -203,6 +205,21 @@ uint16_t ntohs(uint16_t);
#define IP_ADD_SOURCE_MEMBERSHIP 39
#define IP_DROP_SOURCE_MEMBERSHIP 40
#define IP_MSFILTER 41
+#define IP_MULTICAST_ALL 49
+#define IP_UNICAST_IF 50
+
+#ifdef _GNU_SOURCE
+#define MCAST_JOIN_GROUP 42
+#define MCAST_BLOCK_SOURCE 43
+#define MCAST_UNBLOCK_SOURCE 44
+#define MCAST_LEAVE_GROUP 45
+#define MCAST_JOIN_SOURCE_GROUP 46
+#define MCAST_LEAVE_SOURCE_GROUP 47
+#define MCAST_MSFILTER 48
+
+#define MCAST_EXCLUDE 0
+#define MCAST_INCLUDE 1
+#endif
#define IP_RECVRETOPTS IP_RETOPTS
diff --git a/include/sys/epoll.h b/include/sys/epoll.h
index 0ff3d491..5e131ab1 100644
--- a/include/sys/epoll.h
+++ b/include/sys/epoll.h
@@ -28,6 +28,7 @@ enum EPOLL_EVENTS { __EPOLL_DUMMY };
#define EPOLLERR 0x008
#define EPOLLHUP 0x010
#define EPOLLRDHUP 0x2000
+#define EPOLLWAKEUP (1U<<29)
#define EPOLLONESHOT (1U<<30)
#define EPOLLET (1U<<31)
diff --git a/include/sys/inotify.h b/include/sys/inotify.h
index fe251360..a5bf96a6 100644
--- a/include/sys/inotify.h
+++ b/include/sys/inotify.h
@@ -39,6 +39,7 @@ struct inotify_event {
#define IN_ONLYDIR 0x01000000
#define IN_DONT_FOLLOW 0x02000000
+#define IN_EXCL_UNLINK 0x04000000
#define IN_MASK_ADD 0x20000000
#define IN_ISDIR 0x40000000
diff --git a/include/sys/mount.h b/include/sys/mount.h
index 3f652e97..1e1907f4 100644
--- a/include/sys/mount.h
+++ b/include/sys/mount.h
@@ -30,18 +30,36 @@ extern "C" {
#define MS_SYNCHRONOUS 16
#define MS_REMOUNT 32
#define MS_MANDLOCK 64
-#define S_WRITE 128
-#define S_APPEND 256
-#define S_IMMUTABLE 512
+#define MS_DIRSYNC 128
#define MS_NOATIME 1024
#define MS_NODIRATIME 2048
#define MS_BIND 4096
#define MS_MOVE 8192
+#define MS_REC 16384
#define MS_SILENT 32768
+#define MS_POSIXACL (1<<16)
+#define MS_UNBINDABLE (1<<17)
+#define MS_PRIVATE (1<<18)
+#define MS_SLAVE (1<<19)
+#define MS_SHARED (1<<20)
+#define MS_RELATIME (1<<21)
+#define MS_KERNMOUNT (1<<22)
+#define MS_I_VERSION (1<<23)
+#define MS_STRICTATIME (1<<24)
+#define MS_NOSEC (1<<28)
+#define MS_BORN (1<<29)
+#define MS_ACTIVE (1<<30)
+#define MS_NOUSER (1U<<31)
+
+#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION)
#define MS_MGC_VAL 0xc0ed0000
+#define MS_MGC_MSK 0xffff0000
-#define MNT_FORCE 1
+#define MNT_FORCE 1
+#define MNT_DETACH 2
+#define MNT_EXPIRE 4
+#define UMOUNT_NOFOLLOW 8
int mount(const char *, const char *, const char *, unsigned long, const void *);
int umount(const char *);
diff --git a/include/sys/ptrace.h b/include/sys/ptrace.h
index d7e8c76e..21d4ca3a 100644
--- a/include/sys/ptrace.h
+++ b/include/sys/ptrace.h
@@ -29,6 +29,11 @@ extern "C" {
#define PTRACE_GETEVENTMSG 0x4201
#define PTRACE_GETSIGINFO 0x4202
#define PTRACE_SETSIGINFO 0x4203
+#define PTRACE_GETREGSET 0x4204
+#define PTRACE_SETREGSET 0x4205
+#define PTRACE_SEIZE 0x4206
+#define PTRACE_INTERRUPT 0x4207
+#define PTRACE_LISTEN 0x4208
#define PT_READ_I PTRACE_PEEKTEXT
#define PT_READ_D PTRACE_PEEKDATA
@@ -60,7 +65,9 @@ extern "C" {
#define PTRACE_O_TRACEEXEC 0x00000010
#define PTRACE_O_TRACEVFORKDONE 0x00000020
#define PTRACE_O_TRACEEXIT 0x00000040
-#define PTRACE_O_MASK 0x0000007f
+#define PTRACE_O_TRACESECCOMP 0x00000080
+#define PTRACE_O_EXITKILL 0x00100000
+#define PTRACE_O_MASK 0x001000ff
#define PTRACE_EVENT_FORK 1
#define PTRACE_EVENT_VFORK 2
@@ -68,6 +75,7 @@ extern "C" {
#define PTRACE_EVENT_EXEC 4
#define PTRACE_EVENT_VFORK_DONE 5
#define PTRACE_EVENT_EXIT 6
+#define PTRACE_EVENT_SECCOMP 7
long ptrace(int, ...);
diff --git a/include/sys/reboot.h b/include/sys/reboot.h
index 26cc3088..9702eddb 100644
--- a/include/sys/reboot.h
+++ b/include/sys/reboot.h
@@ -9,6 +9,8 @@ extern "C" {
#define RB_ENABLE_CAD 0x89abcdef
#define RB_DISABLE_CAD 0
#define RB_POWER_OFF 0x4321fedc
+#define RB_SW_SUSPEND 0xd000fce2
+#define RB_KEXEC 0x45584543
int reboot(int);
diff --git a/include/sys/signalfd.h b/include/sys/signalfd.h
index 297aac73..4f3d3999 100644
--- a/include/sys/signalfd.h
+++ b/include/sys/signalfd.h
@@ -6,13 +6,14 @@ extern "C" {
#endif
#include <stdint.h>
+#include <fcntl.h>
#define __NEED_sigset_t
#include <bits/alltypes.h>
-#define SFD_CLOEXEC 02000000
-#define SFD_NONBLOCK 04000
+#define SFD_CLOEXEC O_CLOEXEC
+#define SFD_NONBLOCK O_NONBLOCK
int signalfd(int, const sigset_t *, int);
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 19b2aa55..cf042eb1 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -76,10 +76,14 @@ struct linger
#define PF_ASH 18
#define PF_ECONET 19
#define PF_ATMSVC 20
+#define PF_RDS 21
#define PF_SNA 22
#define PF_IRDA 23
#define PF_PPPOX 24
#define PF_WANPIPE 25
+#define PF_LLC 26
+#define PF_CAN 29
+#define PF_TIPC 30
#define PF_BLUETOOTH 31
#define PF_IUCV 32
#define PF_RXRPC 33
@@ -88,7 +92,8 @@ struct linger
#define PF_IEEE802154 36
#define PF_CAIF 37
#define PF_ALG 38
-#define PF_MAX 39
+#define PF_NFC 39
+#define PF_MAX 40
#define AF_UNSPEC PF_UNSPEC
#define AF_LOCAL PF_LOCAL
@@ -114,10 +119,14 @@ struct linger
#define AF_ASH PF_ASH
#define AF_ECONET PF_ECONET
#define AF_ATMSVC PF_ATMSVC
+#define AF_RDS PF_RDS
#define AF_SNA PF_SNA
#define AF_IRDA PF_IRDA
#define AF_PPPOX PF_PPPOX
#define AF_WANPIPE PF_WANPIPE
+#define AF_LLC PF_LLC
+#define AF_CAN PF_CAN
+#define AF_TIPC PF_TIPC
#define AF_BLUETOOTH PF_BLUETOOTH
#define AF_IUCV PF_IUCV
#define AF_RXRPC PF_RXRPC
@@ -126,6 +135,7 @@ struct linger
#define AF_IEEE802154 PF_IEEE802154
#define AF_CAIF PF_CAIF
#define AF_ALG PF_ALG
+#define AF_NFC PF_NFC
#define AF_MAX PF_MAX
#ifndef SO_DEBUG
diff --git a/include/sys/swap.h b/include/sys/swap.h
index 1bd6159e..11c0f929 100644
--- a/include/sys/swap.h
+++ b/include/sys/swap.h
@@ -9,6 +9,7 @@ extern "C" {
#define SWAP_FLAG_PREFER 0x8000
#define SWAP_FLAG_PRIO_MASK 0x7fff
#define SWAP_FLAG_PRIO_SHIFT 0
+#define SWAP_FLAG_DISCARD 0x10000
int swapon (const char *, int);
int swapoff (const char *);
diff --git a/include/sys/timex.h b/include/sys/timex.h
index f37c13ce..08f4b094 100644
--- a/include/sys/timex.h
+++ b/include/sys/timex.h
@@ -50,6 +50,7 @@ struct timex {
#define MOD_TIMECONST ADJ_TIMECONST
#define MOD_CLKB ADJ_TICK
#define MOD_CLKA ADJ_OFFSET_SINGLESHOT
+#define MOD_TAI ADJ_TAI
#define MOD_MICRO ADJ_MICRO
#define MOD_NANO ADJ_NANO
@@ -74,7 +75,7 @@ struct timex {
#define STA_CLK 0x8000
#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \
- STA_PPSERROR | STA_CLOCKERR)
+ STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
#define TIME_OK 0
#define TIME_INS 1
diff --git a/src/aio/lio_listio.c b/src/aio/lio_listio.c
index 532b17ce..64a6ebc1 100644
--- a/src/aio/lio_listio.c
+++ b/src/aio/lio_listio.c
@@ -109,7 +109,7 @@ int lio_listio(int mode, struct aiocb *restrict const *restrict cbs, int cnt, st
if (mode == LIO_WAIT) {
ret = lio_wait(st);
free(st);
- return 0;
+ return ret;
}
if (st) {
diff --git a/src/crypt/crypt_des.c b/src/crypt/crypt_des.c
index 4454a130..dc95dcaa 100644
--- a/src/crypt/crypt_des.c
+++ b/src/crypt/crypt_des.c
@@ -879,10 +879,7 @@ static char *_crypt_extended_r_uut(const char *_key, const char *_setting, char
const unsigned char *key = (const unsigned char *)_key;
const unsigned char *setting = (const unsigned char *)_setting;
struct expanded_key ekey;
- union {
- unsigned char c[8];
- uint32_t i[2];
- } keybuf;
+ unsigned char keybuf[8];
unsigned char *p, *q;
uint32_t count, salt, l, r0, r1;
unsigned int i;
@@ -891,13 +888,13 @@ static char *_crypt_extended_r_uut(const char *_key, const char *_setting, char
* Copy the key, shifting each character left by one bit and padding
* with zeroes.
*/
- q = keybuf.c;
- while (q <= &keybuf.c[sizeof(keybuf.c) - 1]) {
+ q = keybuf;
+ while (q <= &keybuf[sizeof(keybuf) - 1]) {
*q++ = *key << 1;
if (*key)
key++;
}
- des_setkey(keybuf.c, &ekey);
+ des_setkey(keybuf, &ekey);
if (*setting == _PASSWORD_EFMT1) {
/*
@@ -925,14 +922,14 @@ static char *_crypt_extended_r_uut(const char *_key, const char *_setting, char
/*
* Encrypt the key with itself.
*/
- des_cipher(keybuf.c, keybuf.c, 1, 0, &ekey);
+ des_cipher(keybuf, keybuf, 1, 0, &ekey);
/*
* And XOR with the next 8 characters of the key.
*/
- q = keybuf.c;
- while (q <= &keybuf.c[sizeof(keybuf.c) - 1] && *key)
+ q = keybuf;
+ while (q <= &keybuf[sizeof(keybuf) - 1] && *key)
*q++ ^= *key++ << 1;
- des_setkey(keybuf.c, &ekey);
+ des_setkey(keybuf, &ekey);
}
memcpy(output, setting, 9);
diff --git a/src/crypt/crypt_md5.c b/src/crypt/crypt_md5.c
index 02f22444..70ab8b99 100644
--- a/src/crypt/crypt_md5.c
+++ b/src/crypt/crypt_md5.c
@@ -118,7 +118,7 @@ static void md5_init(struct md5 *s)
s->h[3] = 0x10325476;
}
-static void md5_sum(struct md5 *s, uint8_t md[16])
+static void md5_sum(struct md5 *s, uint8_t *md)
{
int i;
diff --git a/src/crypt/crypt_sha256.c b/src/crypt/crypt_sha256.c
index 076e4b16..e01a208b 100644
--- a/src/crypt/crypt_sha256.c
+++ b/src/crypt/crypt_sha256.c
@@ -119,7 +119,7 @@ static void sha256_init(struct sha256 *s)
s->h[7] = 0x5be0cd19;
}
-static void sha256_sum(struct sha256 *s, uint8_t md[20])
+static void sha256_sum(struct sha256 *s, uint8_t *md)
{
int i;
diff --git a/src/crypt/crypt_sha512.c b/src/crypt/crypt_sha512.c
index 0f1de814..8325d77c 100644
--- a/src/crypt/crypt_sha512.c
+++ b/src/crypt/crypt_sha512.c
@@ -136,7 +136,7 @@ static void sha512_init(struct sha512 *s)
s->h[7] = 0x5be0cd19137e2179ULL;
}
-static void sha512_sum(struct sha512 *s, uint8_t md[20])
+static void sha512_sum(struct sha512 *s, uint8_t *md)
{
int i;
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
index 935367e3..782e979f 100644
--- a/src/ldso/dynlink.c
+++ b/src/ldso/dynlink.c
@@ -1091,6 +1091,15 @@ end:
return p;
}
+static int invalid_dso_handle(struct dso *h)
+{
+ struct dso *p;
+ for (p=head; p; p=p->next) if (h==p) return 0;
+ snprintf(errbuf, sizeof errbuf, "Invalid library handle %p", (void *)h);
+ errflag = 1;
+ return 1;
+}
+
static void *do_dlsym(struct dso *p, const char *s, void *ra)
{
size_t i;
@@ -1110,6 +1119,7 @@ static void *do_dlsym(struct dso *p, const char *s, void *ra)
return __tls_get_addr((size_t []){def.dso->tls_id, def.sym->st_value});
return def.dso->base + def.sym->st_value;
}
+ if (invalid_dso_handle(p)) return 0;
if (p->ghashtab) {
gh = gnu_hash(s);
sym = gnu_lookup(s, gh, p);
@@ -1236,6 +1246,12 @@ int dl_iterate_phdr(int(*callback)(struct dl_phdr_info *info, size_t size, void
return ret;
}
#else
+static int invalid_dso_handle(struct dso *h)
+{
+ snprintf(errbuf, sizeof errbuf, "Invalid library handle %p", (void *)h);
+ errflag = 1;
+ return 1;
+}
void *dlopen(const char *file, int mode)
{
return 0;
@@ -1259,5 +1275,5 @@ char *dlerror()
int dlclose(void *p)
{
- return 0;
+ return invalid_dso_handle(p);
}
diff --git a/src/regex/regexec.c b/src/regex/regexec.c
index 855cef57..674c5907 100644
--- a/src/regex/regexec.c
+++ b/src/regex/regexec.c
@@ -596,7 +596,6 @@ tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string,
started from. */
int next_c_start;
const char *str_byte_start;
- int pos_start = -1;
#ifdef TRE_MBSTATE
mbstate_t mbstate_start;
#endif /* TRE_MBSTATE */
@@ -676,9 +675,7 @@ tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string,
}
state = NULL;
- pos = pos_start;
GET_NEXT_WCHAR();
- pos_start = pos;
next_c_start = next_c;
str_byte_start = str_byte;
#ifdef TRE_MBSTATE