From b59c6665c3d3c46c7bcc7699f7cc2349e3748354 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 16 Jan 2000 04:52:59 +0000 Subject: [PATCH] Fix code generated if mmap2 is available when compiling but no at runtime. --- sysdeps/unix/sysv/linux/i386/mmap64.S | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/i386/mmap64.S b/sysdeps/unix/sysv/linux/i386/mmap64.S index 6d7dfe40224..9a355893987 100644 --- a/sysdeps/unix/sysv/linux/i386/mmap64.S +++ b/sysdeps/unix/sysv/linux/i386/mmap64.S @@ -91,16 +91,12 @@ L(einval): movl %ebx, %edx cmpl $0, 28(%esp) - jne L(einval) + jne L(einval2) movl $SYS_ify(mmap), %eax /* System call number in %eax. */ lea 4(%esp), %ebx /* Address of args is 1st arg. */ -# ifdef __NR_mmap2 - jmp L(do_syscall) -# else - /* Do the system call trap. */ int $0x80 @@ -112,14 +108,15 @@ L(einval): ja SYSCALL_ERROR_LABEL /* Successful; return the syscall's value. */ +#ifndef __NR_mmap2 L(pseudo_end): +#endif ret -L(einval): +L(einval2): movl %edx, %ebx movl $-EINVAL, %eax jmp SYSCALL_ERROR_LABEL -# endif #endif PSEUDO_END (__mmap64) -- 2.47.2