Sorry for hijacking this thread. I would like to see this fixed in
version 4.11.
So attached are two patches which are hopefully correct and have
appropriate commit messages and attribution.
Felix
>From 5e1ace609a8a176b4db9f0dc24dcdbf76e2e5d33 Mon Sep 17 00:00:00 2001
From: Felix Janda <felix.ja...@posteo.de>
Date: Sat, 28 Mar 2015 18:21:09 +0100
Subject: [PATCH 1/2] Include <sys/stat.h> for S_*
Fixes a compilation failure with musl libc
* mknod.c: Include <sys/stat.h>
* printmode.c: Likewise
Reported-by: Dima Krasner <d...@dimakrasner.com>
---
mknod.c | 1 +
printmode.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/mknod.c b/mknod.c
index 07e9a45..1463232 100644
--- a/mknod.c
+++ b/mknod.c
@@ -1,6 +1,7 @@
#include "defs.h"
#include <fcntl.h>
+#include <sys/stat.h>
#ifdef MAJOR_IN_SYSMACROS
# include <sys/sysmacros.h>
diff --git a/printmode.c b/printmode.c
index 4df1b9f..a721936 100644
--- a/printmode.c
+++ b/printmode.c
@@ -1,6 +1,7 @@
#include "defs.h"
#include <fcntl.h>
+#include <sys/stat.h>
#include "xlat/modetypes.h"
--
2.0.5
>From 77dad2e3cd6f3738661bc7e820fd7c74b442a3fa Mon Sep 17 00:00:00 2001
From: Felix Janda <felix.ja...@posteo.de>
Date: Sat, 28 Mar 2015 18:40:13 +0100
Subject: [PATCH 2/2] Include <linux/ioctl.h> for _IOC_*
Fixes a compilation failure with musl libc
* evdev.c: Include <linux/ioctl.h>
* ioctl.c: Include <linux/ioctl.h> instead of <asm/ioctl.h>
* ioctlsort.c: Likewise
Reported-by: Dima Krasner <d...@dimakrasner.com>
---
evdev.c | 2 ++
ioctl.c | 2 +-
ioctlsort.c | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/evdev.c b/evdev.c
index 9a7430d..e06f9c1 100644
--- a/evdev.c
+++ b/evdev.c
@@ -28,6 +28,8 @@
#include "defs.h"
+#include <linux/ioctl.h>
+
#ifdef HAVE_LINUX_INPUT_H
#include <linux/input.h>
#include "xlat/evdev_abs.h"
diff --git a/ioctl.c b/ioctl.c
index 46f8334..c67d048 100644
--- a/ioctl.c
+++ b/ioctl.c
@@ -29,7 +29,7 @@
*/
#include "defs.h"
-#include <asm/ioctl.h>
+#include <linux/ioctl.h>
#include "xlat/ioctl_dirs.h"
#ifdef HAVE_LINUX_INPUT_H
diff --git a/ioctlsort.c b/ioctlsort.c
index 333556c..9c31691 100644
--- a/ioctlsort.c
+++ b/ioctlsort.c
@@ -33,7 +33,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <asm/ioctl.h>
+#include <linux/ioctl.h>
struct ioctlent {
const char *info;
--
2.0.5
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel