aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/Implies6
-rw-r--r--sysdeps/unix/sysv/linux/adjtime.c4
-rw-r--r--sysdeps/unix/sysv/linux/i386/init-first.c14
3 files changed, 16 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/Implies b/sysdeps/unix/sysv/linux/Implies
index 3f43b3ea82..41c26f20f9 100644
--- a/sysdeps/unix/sysv/linux/Implies
+++ b/sysdeps/unix/sysv/linux/Implies
@@ -1,9 +1,9 @@
# Linux shares most of the syscalls which are also common to BSD and SVR4.
unix/common
-# Linux has not yet (as of 1.3.18) the canonical set of <sys/mman.h>
-# system calls. msync() and madvice() are missing, so their stubs
-# are found here. I think later version will have them ones.
+# Linux as of version 1.3.29 has all functions of the mmap family
+# which are described in POSIX.4. Missing is only madvise() so
+# we define a stub here.
unix/mman
# Linux has network support in the kernel.
diff --git a/sysdeps/unix/sysv/linux/adjtime.c b/sysdeps/unix/sysv/linux/adjtime.c
index 3673cd9164..8400e1b907 100644
--- a/sysdeps/unix/sysv/linux/adjtime.c
+++ b/sysdeps/unix/sysv/linux/adjtime.c
@@ -43,10 +43,10 @@ __adjtime (itv, otv)
return -1;
}
tntx.offset = tmp.tv_usec + tmp.tv_sec * 1000000L;
- tntx.mode = ADJ_OFFSET_SINGLESHOT;
+ tntx.modes = ADJ_OFFSET_SINGLESHOT;
}
else
- tntx.mode = 0;
+ tntx.modes = 0;
if (__adjtimex (&tntx) < 0) return -1;
diff --git a/sysdeps/unix/sysv/linux/i386/init-first.c b/sysdeps/unix/sysv/linux/i386/init-first.c
index 0177daae24..84b5ff9f2c 100644
--- a/sysdeps/unix/sysv/linux/i386/init-first.c
+++ b/sysdeps/unix/sysv/linux/i386/init-first.c
@@ -18,6 +18,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <unistd.h>
+#include <sysdep.h>
#include "fpu_control.h"
extern void __libc_init (int, char **, char **);
@@ -31,9 +32,16 @@ init (int *data)
char **argv = (void *) (data + 1);
char **envp = &argv[argc + 1];
- /* Make sure we are not using iBSC2 personality. */
- asm ("int $0x80 # syscall no %0, arg %1"
- : : "a" (SYS_ify (personality)), "b" (0));
+ /* Make sure we are not using the iBSC2 personality. The `personality'
+ syscall takes one argument; zero means the Linux personality. The
+ argument arrives in %ebx; we have to save and restore %ebx by hand
+ here, because GCC (as of 2.7.0) cannot handle saving and restoring it
+ for us when it is the dedicated GOT register for PIC. */
+ asm ("pushl %%ebx\n"
+ "xorl %%ebx, %%ebx\n"
+ "int $0x80 # syscall no %0\n"
+ "popl %%ebx"
+ : : "a" (SYS_ify (personality)));
/* Set the FPU control word to the proper default value. */
__setfpucw (___fpu_control);