Fri Apr 16 02:18:05 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
- * Add support for old_*stat functions for Linux. Note to self:
- check osf_*stat functions for Linux alpha.
+ * Add support for old_*stat functions for Linux. Please note you need
+ to use reasonably recent kernel headers to compile strace now.
* Change references to LINUX into linux in file.c
* Fix include for LDT in mem.c
#include <dirent.h>
-#include <sys/stat.h>
#ifdef linux
+#define stat libc_stat
+#include <statbuf.h>
+#undef stat
#include <asm/stat.h>
#endif
+#include <sys/stat.h>
#include <fcntl.h>
#ifdef SVR4
static void
realprintstat(tcp, statbuf)
struct tcb *tcp;
-#ifdef linux
-struct new_stat *statbuf;
-#else
struct stat *statbuf;
-#endif
{
if (!abbrev(tcp)) {
tprintf("{st_dev=makedev(%lu, %lu), st_ino=%lu, st_mode=%s, ",
struct tcb *tcp;
int addr;
{
-#ifdef linux
- struct new_stat statbuf;
-#else
struct stat statbuf;
-#endif
#ifdef LINUXSPARC
if (current_personality == 1) {
#ifdef linux
static void
convertoldstat(oldbuf, newbuf)
-const struct old_stat *oldbuf;
-struct new_stat *newbuf;
+const struct __old_kernel_stat *oldbuf;
+struct stat *newbuf;
{
newbuf->st_dev=oldbuf->st_dev;
newbuf->st_ino=oldbuf->st_ino;
struct tcb *tcp;
int addr;
{
- struct old_stat statbuf;
- struct new_stat newstatbuf;
+ struct __old_kernel_stat statbuf;
+ struct stat newstatbuf;
#ifdef LINUXSPARC
if (current_personality == 1) {