patches/strace/4.5.17/190-dirent-include.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 24 19:35:24 2011 +0200 (2011-07-24)
changeset 2900 369e2fbe9010
permissions -rw-r--r--
cc-gcc: the frontends are responsible for mkdir/chdir

The build dir are created depending on the host (host for that specific
backend, not host for the toolchain). Only the frontends know what host
this is, so only the frontends can create non-ambiguous dirs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@1182
     1
--- strace-orig/file.c	2008/05/20 04:56:18	1.92
yann@1182
     2
+++ strace/file.c	2008/08/01 01:13:10	1.93
yann@1182
     3
@@ -28,21 +28,22 @@
yann@1182
     4
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
yann@1182
     5
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
yann@1182
     6
  *
yann@1182
     7
- *	$Id: file.c,v 1.92 2008/05/20 04:56:18 roland Exp $
yann@1182
     8
+ *	$Id: file.c,v 1.93 2008/08/01 01:13:10 roland Exp $
yann@1182
     9
  */
yann@1182
    10
 
yann@1182
    11
 #include "defs.h"
yann@1182
    12
 
yann@1182
    13
 #include <dirent.h>
yann@1182
    14
+
yann@1182
    15
 #ifdef LINUX
yann@1182
    16
-#define dirent kernel_dirent
yann@1182
    17
-#define dirent64 kernel_dirent64
yann@1182
    18
-#include <linux/types.h>
yann@1182
    19
-#include <linux/dirent.h>
yann@1182
    20
-#undef dirent
yann@1182
    21
-#undef dirent64
yann@1182
    22
+struct kernel_dirent {
yann@1182
    23
+	unsigned long   d_ino;
yann@1182
    24
+	unsigned long   d_off;
yann@1182
    25
+	unsigned short  d_reclen;
yann@1182
    26
+	char            d_name[1];
yann@1182
    27
+};
yann@1182
    28
 #else
yann@1182
    29
-#define kernel_dirent dirent
yann@1182
    30
+# define kernel_dirent dirent
yann@1182
    31
 #endif
yann@1182
    32
 
yann@1182
    33
 #ifdef LINUX