Package: dietlibc-dev
Version: 0.33~cvs20120325
Tags: patch

In dietlibc the syscall to utimes() is created unconditionally for all 
architectures.
But on the hppa arch we do not support this syscall (we do support utime() 
though!), and this leads 
then to build/link errors on other packages which depend on dietlibc.

One example is e2fsprogs:
http://buildd.debian-ports.org/status/fetch.php?pkg=e2fsprogs&arch=hppa&ver=1.42.9-3&stamp=1391614857
/usr/lib/diet/lib-parisc/libc.a(utimes.o): In function `utimes':
(.text+0x4): undefined reference to `__NR_utimes'
collect2: error: ld returned 1 exit status

As you can see above, libc.a now tries to find a function "utimes" which does 
not exist.

The attached patch (especially the small second part of it) fixes this.
(If you prefer you may just drop the first part of the patch which just adds 
more syscalls for hppa!)
It would be nice if you could apply it to the dietlibc debian sources.

Thanks!
Helge
diff -up ./parisc/syscalls.h.org ./parisc/syscalls.h
--- ./parisc/syscalls.h.org	2014-03-16 14:48:47.928098000 -0600
+++ ./parisc/syscalls.h	2014-03-16 14:49:24.200098000 -0600
@@ -323,8 +323,40 @@
 #define __NR_timerfd_create	(__NR_Linux + 306)
 #define __NR_timerfd_settime	(__NR_Linux + 307)
 #define __NR_timerfd_gettime	(__NR_Linux + 308)
+#define __NR_signalfd4		(__NR_Linux + 309)
+#define __NR_eventfd2		(__NR_Linux + 310)
+#define __NR_epoll_create1	(__NR_Linux + 311)
+#define __NR_dup3		(__NR_Linux + 312)
+#define __NR_pipe2		(__NR_Linux + 313)
+#define __NR_inotify_init1	(__NR_Linux + 314)
+#define __NR_preadv		(__NR_Linux + 315)
+#define __NR_pwritev		(__NR_Linux + 316)
+#define __NR_rt_tgsigqueueinfo	(__NR_Linux + 317)
+#define __NR_perf_event_open	(__NR_Linux + 318)
+#define __NR_recvmmsg		(__NR_Linux + 319)
+#define __NR_accept4		(__NR_Linux + 320)
+#define __NR_prlimit64		(__NR_Linux + 321)
+#define __NR_fanotify_init	(__NR_Linux + 322)
+#define __NR_fanotify_mark	(__NR_Linux + 323)
+#define __NR_clock_adjtime	(__NR_Linux + 324)
+#define __NR_name_to_handle_at	(__NR_Linux + 325)
+#define __NR_open_by_handle_at	(__NR_Linux + 326)
+#define __NR_syncfs		(__NR_Linux + 327)
+#define __NR_setns		(__NR_Linux + 328)
+#define __NR_sendmmsg		(__NR_Linux + 329)
+#define __NR_process_vm_readv	(__NR_Linux + 330)
+#define __NR_process_vm_writev	(__NR_Linux + 331)
+#define __NR_kcmp		(__NR_Linux + 332)
+#define __NR_finit_module	(__NR_Linux + 333)
+#define __NR_sched_setattr	(__NR_Linux + 334)
+#define __NR_sched_getattr	(__NR_Linux + 335)
 
-#define __NR_Linux_syscalls	(__NR_fallocate + 1)
+#define __NR_Linux_syscalls	(__NR_sched_getattr + 1)
+
+
+#define __IGNORE_select		/* newselect */
+#define __IGNORE_fadvise64	/* fadvise64_64 */
+#define __IGNORE_utimes		/* utime */
 
 #define LINUX_GATEWAY_ADDR      0x100
 
diff -up ./syscalls.s/utimes.S.org ./syscalls.s/utimes.S
--- ./syscalls.s/utimes.S.org	2014-03-16 15:00:47.740098000 -0600
+++ ./syscalls.s/utimes.S	2014-03-16 15:02:06.816098000 -0600
@@ -1,3 +1,6 @@
 #include "syscalls.h"
 
+/* hppa does not support utimes syscall */
+#ifdef __NR_utimes
 syscall(utimes,utimes)
+#endif

Reply via email to