]> git.pld-linux.org Git - packages/dietlibc.git/commitdiff
- add umount-arch.patch from debian, fixing umount syscalls for alpha, ia64 auto/ac/dietlibc-0_32-16 auto/th/dietlibc-0_32-16 auto/ti/dietlibc-0_32-16
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 27 Mar 2012 07:06:31 +0000 (07:06 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dietlibc.spec -> 1.107
    umount-arch.patch -> 1.1

dietlibc.spec
umount-arch.patch [new file with mode: 0644]

index ceaf9afd27649ad298b6289a5d5f35da4878b452..0b6ae048642328cd465be0d1daad765db8d184f6 100644 (file)
@@ -12,7 +12,7 @@ Summary(pl.UTF-8):    Biblioteka standardowa C zoptymalizowana na rozmiar
 Summary(pt_BR.UTF-8):  libc pequena otimizada para tamanho
 Name:          dietlibc
 Version:       0.32
-Release:       15
+Release:       16
 Epoch:         2
 License:       GPL v2
 Group:         Development/Libraries
@@ -33,6 +33,7 @@ Patch10:      %{name}-fflush-null.patch
 Patch11:       %{name}-_syscall-no-arch.patch
 
 Patch13:       %{name}-strcoll.patch
+Patch14:       umount-arch.patch
 Patch15:       %{name}-memalign.patch
 Patch16:       %{name}-getsubopt.patch
 Patch17:       %{name}-devmacros.patch
@@ -124,6 +125,7 @@ statyczne.
 %patch11 -p1
 
 %patch13 -p1
+%patch14 -p1
 %patch15 -p1
 %patch16 -p1
 %patch17 -p1
diff --git a/umount-arch.patch b/umount-arch.patch
new file mode 100644 (file)
index 0000000..e70c51b
--- /dev/null
@@ -0,0 +1,121 @@
+Debian patches
+
+0011-Add-new-defines-to-indicate-which-syscall-is-umount-3.diff
+0012-Add-an-implementation-of-umount-3-for-ia64.diff .
+
+From a35138d49e022dd94fd91974fa2ed2ef6dd58a90 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Sat, 3 Jan 2009 12:04:48 +0000
+Subject: [PATCH 11/13] Add new #defines to indicate which syscall is umount(3) and which is umount2(3).
+
+* on architectures where __NR_umount is umount(3) and __NR_umount2 is
+  umount2(3), don't do anything special
+* on architectures where this is not the case, define __NR_umount_with_flags
+  so that it's umount2(3)
+* define __NR_umount_without_flags to be umount(3) on architectures where
+  such a syscall exists
+
+In the currently-supported architectures there are four families:
+
+* on i386, arm etc., __NR_umount takes one argument and __NR_umount2 takes two
+* on x86_64 and parisc __NR_umount2 takes two arguments and there is no
+  1-argument umount
+* on alpha, __NR_oldumount takes one argument and __NR_umount takes two
+* on ia64, __NR_umount takes two arguments and there is no 1-argument umount
+---
+ alpha/syscalls.h     |    2 ++
+ ia64/syscalls.h      |    2 ++
+ syscalls.s/umount.S  |    4 ++++
+ syscalls.s/umount2.S |    4 +++-
+ 4 files changed, 11 insertions(+), 1 deletions(-)
+
+diff --git a/alpha/syscalls.h b/alpha/syscalls.h
+index 1ab37e8..7636b0c 100644
+--- a/alpha/syscalls.h
++++ b/alpha/syscalls.h
+@@ -413,6 +413,8 @@
+ #define __NR_timerfd                  477
+ #define __NR_eventfd                  478
++#define __NR_umount_without_flags __NR_oldumount
++#define __NR_umount_with_flags __NR_umount
+ #define syscall_weak(name,wsym,sym) \
+ .text ; \
+diff --git a/ia64/syscalls.h b/ia64/syscalls.h
+index 907cb5c..7e86174 100644
+--- a/ia64/syscalls.h
++++ b/ia64/syscalls.h
+@@ -290,6 +290,8 @@
+ #define __NR_timerfd_settime          1311
+ #define __NR_timerfd_gettime          1312
++#define __NR_umount_with_flags __NR_umount
++
+ #define syscall(name, sym) \
+ .text; \
+ .globl sym; \
+diff --git a/syscalls.s/umount.S b/syscalls.s/umount.S
+index 4a423d9..89793e2 100644
+--- a/syscalls.s/umount.S
++++ b/syscalls.s/umount.S
+@@ -1,3 +1,7 @@
+ #include "syscalls.h"
++#if defined(__NR_umount_without_flags)
++syscall(umount_without_flags,umount)
++#elif !defined(__NR_umount_with_flags) || (__NR_umount != __NR_umount_with_flags)
+ syscall(umount,umount)
++#endif
+diff --git a/syscalls.s/umount2.S b/syscalls.s/umount2.S
+index b27b353..5742416 100644
+--- a/syscalls.s/umount2.S
++++ b/syscalls.s/umount2.S
+@@ -1,5 +1,7 @@
+ #include "syscalls.h"
+-#ifdef __NR_umount2
++#if defined(__NR_umount_with_flags)
++syscall(umount_with_flags,umount2)
++#elif defined(__NR_umount2)
+ syscall(umount2,umount2)
+ #endif
+-- 
+1.7.0.3
+
+From 4510d9f53bd77bc8b97d37c78b499d85d0a97d4f Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Sat, 3 Jan 2009 12:11:42 +0000
+Subject: [PATCH 12/13] Add an implementation of umount(3) for ia64
+
+Like x86_64 and parisc, ia64 lacks a single-argument umount syscall, so we
+need to provide a stub implementation that just calls umount2(path, 0).
+I don't know ia64 assembler, so this one is in C.
+---
+ ia64/Makefile.add     |    2 +-
+ ia64/umount-wrapper.c |    5 +++++
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+ create mode 100644 ia64/umount-wrapper.c
+
+diff --git a/ia64/Makefile.add b/ia64/Makefile.add
+index f660930..ca00e4d 100644
+--- a/ia64/Makefile.add
++++ b/ia64/Makefile.add
+@@ -1,2 +1,2 @@
+ VPATH:=ia64:syscalls.s:$(VPATH)
+-LIBOBJ+=$(OBJDIR)/__time.o $(OBJDIR)/__waitpid.o $(OBJDIR)/__nice.o $(OBJDIR)/__alarm.o
++LIBOBJ+=$(OBJDIR)/__time.o $(OBJDIR)/__waitpid.o $(OBJDIR)/__nice.o $(OBJDIR)/__alarm.o $(OBJDIR)/umount-wrapper.o
+diff --git a/ia64/umount-wrapper.c b/ia64/umount-wrapper.c
+new file mode 100644
+index 0000000..2ebffd6
+--- /dev/null
++++ b/ia64/umount-wrapper.c
+@@ -0,0 +1,5 @@
++#include <sys/mount.h>
++
++int umount(const char *target) {
++  return umount2(target, 0);
++}
+-- 
+1.7.0.3
+
This page took 0.053315 seconds and 4 git commands to generate.